Release to Live #5
Workflow file for this run
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
# Releases from sf-qa branch to Live production server. | |
name: "Release to Live" | |
concurrency: deploy-prod | |
on: | |
workflow_dispatch: | |
inputs: | |
release-level: | |
description: "The level of release. This will bump the major.minor.patch version number accordingly." | |
required: true | |
default: "patch" | |
type: choice | |
options: | |
- "patch" | |
- "minor" | |
- "major" | |
skip-branch-update: | |
description: "Don't update the release branch, and release from its current commit. For example, when releasing a hotfix that has already been pushed to the release branch. If this is set, 'from-staging-version' is ignored." | |
required: true | |
type: boolean | |
default: false | |
from-staging-version: | |
description: "QA version from which to release (eg '123' or '234'). Leave blank for latest." | |
required: false | |
type: string | |
default: "" | |
jobs: | |
determine_build_commit: | |
name: "Determine commit from which to build" | |
runs-on: ubuntu-latest | |
outputs: | |
build_commit: "${{ steps.get_commit.outputs.build_commit }}" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Use existing branch sf-live | |
if: ${{ github.event.inputs.skip-branch-update == 'true' }} | |
run: git checkout sf-live | |
- name: Use latest branch sf-qa | |
if: ${{ github.event.inputs.skip-branch-update == 'false' && github.event.inputs.from-staging-version == '' }} | |
run: git checkout sf-qa | |
- name: Use specific QA version | |
if: ${{ github.event.inputs.skip-branch-update == 'false' && github.event.inputs.from-staging-version != '' }} | |
run: git checkout "SF-QAv${{ github.event.inputs.from-staging-version }}" | |
- name: Get commit | |
id: get_commit | |
run: echo "build_commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
determine_version: | |
name: "Determine version" | |
needs: determine_build_commit | |
uses: ./.github/workflows/compute-next-version.yml | |
with: | |
versioning-system: "production" | |
release-level: ${{ github.event.inputs.release-level }} | |
tag_prefix: "SFv" | |
release_branch: "sf-live" | |
deploy: | |
name: "Deploy to Live" | |
needs: [determine_build_commit, determine_version] | |
secrets: inherit | |
uses: ./.github/workflows/release.yml | |
with: | |
environment: "production" | |
build_commit: "${{ needs.determine_build_commit.outputs.build_commit }}" | |
release_branch: "sf-live" | |
dotnet_version: "8.0.x" | |
node_version: "18.20.2" | |
npm_version: "10.5.0" | |
os: "ubuntu-20.04" | |
angular_config: "production" | |
app_name: "scriptureforge" | |
app_suffix: "" | |
version_number: "${{ needs.determine_version.outputs.next_version }}" | |
vcs_tag_prefix: "SFv" | |
node_options: "--max_old_space_size=4096" | |
project: "SIL.XForge.Scripture" |