Skip to content

Commit

Permalink
Update npm-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sudaraka94 authored Apr 4, 2024
1 parent 75052ba commit a1a35de
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
name: Publish to NPM
name: Release
on:
push:
branches:
- main
- master

permissions:
contents: read # for checkout

jobs:
build:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
always-auth: true
- run: yarn install
- name: Publish package on NPM 📦
run: yarn publish --access=public
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npx semantic-release

0 comments on commit a1a35de

Please sign in to comment.