Skip to content

Commit

Permalink
ci(publish): create GH release
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Dec 30, 2024
1 parent adddf9a commit 6186cf8
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,44 @@ jobs:
uses: "./.github/workflows/ci.yml"

publish:
name: Publish to npm
name: Publish
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
- uses: actions/download-artifact@v4

- name: Download prebuilds
uses: actions/download-artifact@v4
with:
path: prebuilds
pattern: prebuilds-*
merge-multiple: true
- run: tree prebuilds
- run: npm install
- run: npm publish

- name: List prebuilds
run: tree prebuilds

- name: Install dependencies
run: npm install

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create release
run: |-
gh release create --generate-notes \
${{ github.ref_name }} \
prebuilds/**/*.node
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 6186cf8

Please sign in to comment.