Skip to content

v0.1.8

v0.1.8 #13

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish package to npm
on:
release:
types: [created]
workflow_dispatch:
permissions:
id-token: write
contents: write
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v4
with:
node-version: 21
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm version from-git --no-commit-hooks --no-git-tag-version --allow-same-version
working-directory: ./schemas
- run: pnpm install -r --frozen-lockfile
- run: pnpm run -r build && pnpm install -r -f --frozen-lockfile && pnpm run -r build
- run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
pnpm publish --no-git-checks --tag ${{ github.event.release.prerelease && 'next' || 'latest' }}
working-directory: ./schemas
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push version changes to main branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "bump @kulupu-linku/sona version ${{ github.event.release.tag_name }}"
branch: ${{ github.event.repository.default_branch }}
file_pattern: schemas/package.json