Skip to content

v0.10.0

v0.10.0 #29

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 }}