Release & Publish #44
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
# Runs on release tag push, but not prereleases, we hope! | |
name: Release & Publish | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
permissions: | |
packages: write | |
contents: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: x.20 | |
cache: 'npm' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Build all bundles | |
env: | |
NODE_ENV: production | |
run: | | |
npm ci --include=dev | |
npm run build | |
- uses: ncipollo/release-action@v1 | |
with: | |
name: '${{ github.ref_name }}' | |
body: 'Automated release of ${{ github.ref_name }} built by ${{ github.actor }}.' | |
artifacts: 'dist-bundle/*' | |
- name: Publish release to Github Packages | |
run: | | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |