Merge pull request #148 from chartium/release-please--branches--main-β¦ #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release using release-please | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
target-branch: ${{ github.ref_name }} | |
build: | |
runs-on: ubuntu-latest | |
needs: release-please | |
if: ${{ needs.release-please.outputs.release_created }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
registry-url: https://registry.npmjs.org/ | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Install rust wasm target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Use rust build cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: src/rust -> target | |
- name: Install wasm-bindgen-cli | |
uses: jetli/wasm-bindgen-action@v0.2.0 | |
with: | |
version: '0.2.93' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Publish libchartium | |
run: pnpm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |