Skip to content

🔖 v0.0.3

🔖 v0.0.3 #3

Workflow file for this run

name: Node.js Publish
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
if: github.actor != 'nektos/act'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 21
- run: pnpm install
- run: pnpm build
- run: |
pnpm config set @natoboram:registry 'https://npm.pkg.github.com'
pnpm config set //npm.pkg.github.com/:_authToken '${NODE_AUTH_TOKEN}'
pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
pnpm config set @natoboram:registry 'https://registry.npmjs.org'
pnpm config set //registry.npmjs.org/:_authToken '${NODE_AUTH_TOKEN}'
pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm pack --pack-gzip-level 9
- name: Sign
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.DEPLOY_KEY_PRIVATE }}'
echo '${{ vars.DEPLOY_KEY_PUBLIC }}' > '${{ runner.temp }}/DEPLOY_KEY_PUBLIC.pub'
ssh-keygen -Y sign -f '${{ runner.temp }}/DEPLOY_KEY_PUBLIC.pub' -n file natoboram-based.ts-*.tgz
ssh-keygen -Y verify -f ./.github/authorized_keys -I '41898282+github-actions[bot]@users.noreply.github.com' -n file -s natoboram-based.ts-*.tgz.sig < natoboram-based.ts-*.tgz
- run: gh release upload ${{ github.ref_name }} natoboram-based.ts-*.tgz natoboram-based.ts-*.tgz.sig
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}