Skip to content

Publish master to GitHub Packages #17

Publish master to GitHub Packages

Publish master to GitHub Packages #17

Workflow file for this run

name: Publish master to GitHub Packages
on:
workflow_run:
workflows: [ "Run Tests" ]
types:
- completed
branches:
- master
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'skipped' }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
registry-url: "https://npm.pkg.github.com"
scope: "@ikigai-systems"
- name: Install dependencies
run: npm ci
- name: Set version from commit SHA
env:
GITHUB_SHA: ${{ github.sha }}
run: npm version --no-git-tag-version "$(jq -r .version package.json)-master.${GITHUB_SHA::7}"
- name: Publish to GitHub Packages
run: npm publish --tag prerelease
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}