Skip to content

feat(skill): switch TMA knowledge skill to Node (#29) #57

feat(skill): switch TMA knowledge skill to Node (#29)

feat(skill): switch TMA knowledge skill to Node (#29) #57

Workflow file for this run

name: Publish create-spawn-dock
on:
workflow_dispatch:
push:
tags:
- "v*"
branches:
- main
concurrency:
group: publish-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions: {}
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- name: Install dependencies
uses: ./.github/actions/setup
- name: Run checks
run: pnpm typecheck
- name: Run tests
run: pnpm test
- name: Build package
run: pnpm build
- name: Configure npm registry
uses: actions/setup-node@v6
with:
node-version: 22.12.0
registry-url: https://registry.npmjs.org
- name: Verify npm auth secret
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}
shell: bash
run: |
if [[ -z "${NODE_AUTH_TOKEN}" ]]; then
echo "Missing npm auth secret. Set NPM_KEY." >&2
exit 1
fi
- name: Determine publish version
id: version
shell: bash
run: |
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
echo "type=release" >> "$GITHUB_OUTPUT"
echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
else
SHORT_SHA="${GITHUB_SHA::7}"
TIMESTAMP="$(date +%Y%m%d%H%M%S)"
CURRENT="$(node -p "require('./package.json').version")"
echo "type=canary" >> "$GITHUB_OUTPUT"
echo "version=${CURRENT}-canary.${TIMESTAMP}.${SHORT_SHA}" >> "$GITHUB_OUTPUT"
fi
- name: Set package version
run: npm version "${{ steps.version.outputs.version }}" --no-git-tag-version --allow-same-version
- name: Publish release (stable or prerelease)
if: steps.version.outputs.type == 'release'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}
shell: bash
run: |
VERSION="${{ steps.version.outputs.version }}"
if [[ "$VERSION" == *-* ]]; then
npm publish --access public --tag beta
else
npm publish --access public
fi
- name: Publish canary
if: steps.version.outputs.type == 'canary'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}
run: npm publish --access public --tag canary