Skip to content

v0.0.5

v0.0.5 #12

Workflow file for this run

name: Publish Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Update npm to latest
run: npm install -g npm@latest
# Install pnpm so publint can pack
- name: Install pnpm (required by publint)
run: npm install -g pnpm@10.20
- name: Extract version from release tag
id: version
run: |
TAG="${GITHUB_REF#refs/tags/}"
VERSION="${TAG#v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Update package.json version
run: npm version "$VERSION" --no-git-tag-version
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build --if-present
# - name: Run tests
# run: npm test --if-present
- name: Publish to npm (token auth)
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}