Skip to content

1.0.13-0

1.0.13-0 #17

Workflow file for this run

name: Publish to NPM
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
always-auth: true
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Verify version matches tag
run: |
TAG="${GITHUB_REF#refs/tags/}"
VERSION="${TAG#v}"
FILE_VERSION=$(node -p "require('./package.json').version")
if [ "$VERSION" != "$FILE_VERSION" ]; then
echo "Version mismatch: tag=$VERSION, package.json=$FILE_VERSION"
exit 1
fi
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --no-git-checks --access public
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
tag_name: ${{ github.ref_name }}
body: "Nueva versión de tanko disponible en NPM."