chore: fix ci #11
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: Publish packages and crates | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
call-rust-build: | |
uses: ./.github/workflows/build.yaml | |
release: | |
name: Release | |
needs: [call-rust-build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
# batch download artifacts | |
- uses: actions/download-artifact@v3 | |
with: | |
path: /tmp/artifacts | |
- name: Move Artifacts | |
run: | | |
for abi in linux-x64-gnu linux-x64-musl darwin-x64 win32-x64-msvc linux-arm64-musl linux-arm64-gnu darwin-arm64 win32-ia32-msvc win32-arm64-msvc | |
do | |
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin/* ./npm/${abi} | |
test -f ./npm/${abi}/index.farm | |
done | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: npm install -g [email protected] && pnpm i --frozen-lockfile | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
version: pnpm run bump | |
# This expects you to have a script called release which does a build for your packages and calls changeset publish | |
publish: pnpm release | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |