Skip to content

Commit

Permalink
ci: npm
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicFun1241 authored Aug 19, 2024
1 parent 8361504 commit 60dd289
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
arch: amd64
- os: ubuntu-latest
arch: arm64


runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -65,7 +66,7 @@ jobs:
native/*.dylib
if-no-files-found: error

release:
github-release:
needs: build
runs-on: ubuntu-latest
permissions:
Expand All @@ -81,8 +82,6 @@ jobs:
- name: Get package version
id: get_version
run: |
pwd
ls
VERSION=$(jq -r .version package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
Expand All @@ -92,3 +91,16 @@ jobs:
with:
artifacts: "release/**"
tag: v${{ env.VERSION }}

npm-release:
needs: github-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2

- run: |
echo _auth=${{ secrets.NPM_TOKEN }} >> .npmrc
echo email=${{ secrets.EMAIL }} >> .npmrc
bunx npm publish

0 comments on commit 60dd289

Please sign in to comment.