v0.1.1 #40
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: Package Publish on Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
var: | |
name: Set variables | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.var.outputs.tag }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set variables | |
id: var | |
run: | | |
TAG="$(git describe --tags)" && echo "tag=${TAG#v}" >> $GITHUB_OUTPUT | |
build: | |
name: Build | |
needs: var | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@mutablelogic' | |
- name: Publish | |
run: | | |
npm ci | |
npm version ${{ needs.var.outputs.tag }} --no-git-tag-version --allow-same-version | |
npm run build | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |