Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Elli610 committed Mar 28, 2024
1 parent 130babd commit e85b7c0
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/publish-npmjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ name: Publish Package to npmjs
on:
release:
types: [published]
push:
branches:
- main


jobs:
test:
uses: ./.github/workflows/linter&test.yml
Expand All @@ -15,16 +12,13 @@ jobs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
# Ensure the publish script is executable
- run: chmod +x ./scripts/publish.sh
# Execute the publish script
- run: ./scripts/publish.sh stable
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

0 comments on commit e85b7c0

Please sign in to comment.