release #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-latest | |
outputs: | |
github-release-id: ${{ steps.init-step.outputs.github-release-id }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- 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 |