mirror of
https://github.com/project-gauntlet/gauntlet.git
synced 2025-12-23 10:35:53 +00:00
87 lines
2.9 KiB
YAML
87 lines
2.9 KiB
YAML
name: release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
provided-github-release-id:
|
|
type: string
|
|
description: Providing this value will reuse previous version and github release, use only in case of failed previous release
|
|
do-npm-publish:
|
|
type: boolean
|
|
default: true
|
|
description: Providing false will skip `npm publish`, use only in case of failed previous release
|
|
do-linux-build:
|
|
type: boolean
|
|
default: true
|
|
description: Providing false will skip linux build, use only in case of failed previous release
|
|
do-macos-build:
|
|
type: boolean
|
|
default: true
|
|
description: Providing false will skip macos build, use only in case of failed previous release
|
|
do-windows-build:
|
|
type: boolean
|
|
default: true
|
|
description: Providing false will skip windows build, use only in case of failed previous release
|
|
|
|
jobs:
|
|
publish-init:
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
github-release-id: ${{ steps.init-step.outputs.github-release-id }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- run: npm ci
|
|
|
|
- run: git config --global user.name "${GITHUB_ACTOR}"
|
|
- run: git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
|
|
|
|
- run: npm run publish-init-project --workspace @project-gauntlet/build
|
|
id: init-step
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PROVIDED_GITHUB_RELEASE_ID: ${{ inputs.provided-github-release-id }}
|
|
|
|
publish-linux:
|
|
needs:
|
|
- publish-init
|
|
if: ${{ inputs.do-linux-build }}
|
|
uses: ./.github/workflows/setup-linux.yaml
|
|
with:
|
|
command: npm run publish-linux-project --workspace @project-gauntlet/build
|
|
github-release-id: ${{ needs.publish-init.outputs.github-release-id }}
|
|
|
|
publish-windows:
|
|
needs:
|
|
- publish-init
|
|
if: ${{ inputs.do-windows-build }}
|
|
uses: ./.github/workflows/setup-windows.yaml
|
|
with:
|
|
command: npm run publish-windows-project --workspace @project-gauntlet/build
|
|
github-release-id: ${{ needs.publish-init.outputs.github-release-id }}
|
|
|
|
publish-macos:
|
|
needs:
|
|
- publish-init
|
|
if: ${{ inputs.do-macos-build }}
|
|
uses: ./.github/workflows/setup-macos.yaml
|
|
with:
|
|
command: npm run publish-macos-project --workspace @project-gauntlet/build
|
|
github-release-id: ${{ needs.publish-init.outputs.github-release-id }}
|
|
secrets: inherit
|
|
|
|
publish-final:
|
|
needs:
|
|
- publish-linux
|
|
- publish-macos
|
|
- publish-windows
|
|
- publish-init
|
|
if: ${{ inputs.do-npm-publish }}
|
|
uses: ./.github/workflows/setup-linux.yaml
|
|
with:
|
|
command: npm run publish-final-project --workspace @project-gauntlet/build
|
|
github-release-id: ${{ needs.publish-init.outputs.github-release-id }}
|
|
secrets: inherit
|