v0.10.0 #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: upload-to-release | |
# Every time a new release is created | |
on: | |
release: | |
types: [published] | |
# Add the *.tgz file generated by npm pack to the release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup NodeJS version (from .nvmrc) | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Install dependencies | |
run: npm ci | |
- name: Generate archive | |
run: echo "archive=$(npm pack 2>/dev/null | tail -1)" >> $GITHUB_ENV | |
- name: Upload ${{ env.archive }} to release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ github.ref_name }} ${{ env.archive }} |