regime/actions/release/action.yml

47 lines
1.3 KiB
YAML

name: Semantic Release
description: Run semantic-release (multi for monorepos, standard for solo packages)
inputs:
gitea-token:
description: "Forgejo API token with push + API access"
required: true
gitea-url:
description: "Forgejo instance URL"
required: true
npm-token:
description: "npm registry auth token"
required: true
runs:
using: composite
steps:
- name: Setup Bun
shell: bash
run: curl -fsSL https://bun.sh/install | bash && echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
- name: Resolve external workspaces
shell: bash
run: bun "$GITHUB_ACTION_PATH/../../scripts/resolve-workspaces.ts"
- name: Install dependencies
shell: bash
run: bun install --no-save-lockfile
- name: Configure npm auth
shell: bash
env:
NPM_TOKEN: ${{ inputs.npm-token }}
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
- name: Run multi-semantic-release
shell: bash
env:
GITEA_TOKEN: ${{ inputs.gitea-token }}
GITEA_URL: ${{ inputs.gitea-url }}
NPM_TOKEN: ${{ inputs.npm-token }}
run: |
if node -e "const p=require('./package.json'); process.exit(p.workspaces ? 0 : 1)"; then
bunx multi-semantic-release
else
bunx semantic-release
fi