Skip to content

v0.4.3

v0.4.3 #23

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
version:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.version.outputs.result }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: corepack enable pnpm
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version-file: ".nvmrc"
cache: pnpm
- run: pnpm install --frozen-lockfile
- id: version
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const semver = require("semver")
const version = context.ref.replace('refs/tags/v', '')
if (semver.valid(version)) {
return version
}
throw new Error('not semver')
result-encoding: string
npm:
name: Release NPM
runs-on: ubuntu-latest
needs: Version
environment: NPM Release
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: corepack enable pnpm
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version-file: ".nvmrc"
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -r exec npm version ${{ needs.version.outputs.result }} --git-tag-version=false
- run: pnpm build
- run: npm config set "//registry.npmjs.org/:_authToken" "\${NPM_AUTH_TOKEN}" --location=project
- run: pnpm -r publish --access public --tag latest --no-git-checks
env:
NPM_AUTH_TOKEN: ${{ secrets.ORDZAAR_NPM_BOT }}
- run: npm config delete "//registry.npmjs.org/:_authToken" --location=project
if: always()