Skip to content

Commit

Permalink
Merge pull request #882 from statisticsnorway/add-environment-to-depl…
Browse files Browse the repository at this point in the history
…oy-step-in-github-action

added env to deploy action and automatic tag and release
  • Loading branch information
annesiri authored Oct 27, 2023
2 parents af57395 + ce72b2a commit 4b6545f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
CI: true

publish:
environment: production
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
Expand All @@ -46,6 +47,10 @@ jobs:
- run: npm run build:prod
- run: npm test
- uses: JS-DevTools/npm-publish@v1
id: publishNpm
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: false
- run: gh release create ${{ steps.publishNpm.outputs.version }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4b6545f

Please sign in to comment.