Skip to content

Commit

Permalink
upgrade github actions (#247)
Browse files Browse the repository at this point in the history
* upgrade github actions

---------

Co-authored-by: EdwardScull <[email protected]>
  • Loading branch information
edwardscull and EdwardScull authored Feb 14, 2025
1 parent 39b607b commit 3e7b887
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: Publish to NPM

on:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
Expand All @@ -25,18 +24,14 @@ jobs:
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/nhsapp-frontend-${{ steps.get_version.outputs.VERSION }}.zip
asset_name: nhsapp-frontend-${{ steps.get_version.outputs.VERSION }}.zip
asset_content_type: application/zip
files: ./dist/nhsapp-frontend-${{ steps.get_version.outputs.VERSION }}.zip

- name: Publish NPM package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
IS_PRERELEASE: ${{github.event.release.prerelease}}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
IS_PRERELEASE: ${{ github.event.release.prerelease }}

0 comments on commit 3e7b887

Please sign in to comment.