Release v2.1.3 by @bjee19 #1
This file contains hidden or 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: Production Release | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Release version (e.g., v2.0.3)' | ||
| required: true | ||
| type: string | ||
| dry_run: | ||
| description: 'If true, does a dry run of the production workflow' | ||
| required: false | ||
| type: boolean | ||
| run-name: ${{ inputs.dry_run && '[DRY RUN] ' || '' }}Release ${{ inputs.version }} by @${{ github.actor }} | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| create-tag-and-release: | ||
| runs-on: ubuntu-24.04 | ||
| if: startsWith(github.ref, 'refs/heads/release-') | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Validate Release Branch and Version | ||
| run: | | ||
| echo "Validating release from: ${GITHUB_REF}" | ||
| INPUT_VERSION="${{ github.event.inputs.version }}" | ||
| # Validate version format | ||
| if [[ ! "${INPUT_VERSION}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
| echo "❌ Invalid version format: ${INPUT_VERSION}" | ||
| echo "Expected format: v1.2.3" | ||
| exit 1 | ||
| fi | ||
| echo "✅ Valid release branch: ${GITHUB_REF}" | ||
| echo "✅ Valid version format: ${INPUT_VERSION}" | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Create Release Tag | ||
| run: | | ||
| VERSION="${{ github.event.inputs.version }}" | ||
| git config user.name "NGF Release Bot" | ||
| git config user.email "[email protected]" | ||
| if git rev-parse --verify "refs/tags/${VERSION}" >/dev/null 2>&1; then | ||
| echo "Tag ${VERSION} already exists - skipping tag creation" | ||
| else | ||
| echo "Creating annotated tag ${VERSION}" | ||
| git tag -a "${VERSION}" -m "Release ${VERSION}" | ||
| if [[ "${{ inputs.dry_run }}" == "true" ]]; then | ||
| echo "DRY RUN: Would push tag ${VERSION}" | ||
| git push --dry-run origin "${VERSION}" | ||
| else | ||
| git push origin "${VERSION}" | ||
| echo "Created and pushed tag: ${VERSION}" | ||
| fi | ||
| fi | ||
| production-build: | ||
|
Check failure on line 73 in .github/workflows/production-release.yml
|
||
| needs: create-tag-and-release | ||
| uses: ./.github/workflows/ci.yml | ||
| with: | ||
| is_production_release: true | ||
| release_version: ${{ github.event.inputs.version }} | ||
| dry_run: ${{ github.event.inputs.dry_run }} | ||
| secrets: inherit | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| id-token: write | ||
| security-events: write | ||