Skip to content

Commit

Permalink
attach npm package to release
Browse files Browse the repository at this point in the history
  • Loading branch information
mlankamp committed Jan 13, 2023
1 parent 301a941 commit 99211eb
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:

jobs:
setup:
permissions:
contents: none
runs-on: ubuntu-latest
outputs:
version: ${{ steps.trim.outputs.version }}
Expand All @@ -17,11 +19,10 @@ jobs:
TAG: ${{ github.event.release.tag_name }}

release:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
needs: setup
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -48,4 +49,14 @@ jobs:
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}


- name: Upload NPM package file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ needs.setup.outputs.version }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ format('@xeokit/xeokit-sdk-{0}.tgz', needs.setup.outputs.version) }}
asset_name: ${{ format('@xeokit/xeokit-sdk-{0}.tgz', needs.setup.outputs.version) }}
asset_content_type: application/gzip

0 comments on commit 99211eb

Please sign in to comment.