Skip to content

Publish package

Publish package #5

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
on:
release:
types: [created]
workflow_dispatch:
jobs:
sync-release-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Merge dev -> release
uses: devmasx/merge-branch@master
with:
type: now
from_branch: dev
target_branch: release
message: Merge into release
github_token: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lock
- run: pnpm build
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- run: pnpm install --frozen-lock
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}