Skip to content

Merge pull request #103 from FusionAuth/mike/bump-swift-6.2-xcode-26.0.1 #73

Merge pull request #103 from FusionAuth/mike/bump-swift-6.2-xcode-26.0.1

Merge pull request #103 from FusionAuth/mike/bump-swift-6.2-xcode-26.0.1 #73

Workflow file for this run

name: Release
on:
# Triggers the workflow on push events but only for default and protected branches
push:
branches:
- main
# The different jobs of this workflow need the following permissions
permissions:
# The release-please-action requires these permissions to create a github release
contents: write
# The release-please-action requires these permissions to create and modify pull requests
pull-requests: write
# The release-please-action requires these permissions to read pull request labels
repository-projects: read
# This workflow calls and imports multiple other workflows and actions. T
# It is only required for workflows in private repositories
actions: write
# The release workflow calls multiple code quality and security workflows which create security output
security-events: write
# This is required to fetch internal or private CodeQL packs
packages: read
# This workflow is part of the release group and will not run concurrently with other workflows in the same group
concurrency:
group: release
jobs:
# This job creates the necessary labels for the release-please PRs:
# GitHub introduced a situation where these labels are not created which caused the release-please-action to fail.
# googleapis underlying release-please needs to add a check for the existence of these labels,
# and create them if they are not present.
# https://github.com/googleapis/release-please-action/issues/1074
label-check:
name: Create release-please PR labels
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Add labels to the repository if not present
env:
GH_TOKEN: ${{ github.token }}
run: |
gh label create "autorelease: pending" -c FBCA04 -d "release-please PR tagging - Pending release" || true
gh label create "autorelease: tagged" -c D4C5F9 -d "release-please PR tagging - Ready for release" || true
gh label create "autorelease: snapshot" -c D4C5F9 -d "release-please PR tagging - Ready for release" || true
gh label create "autorelease: published" -c 0E8A16 -d "release-please PR tagging - Released" || true
# This job runs a simple E2E test with the latest FusionAuth and iOS version as a prerequisite for the prerelease-prep
initial-e2e-test:
name: Run Prerelease E2E Tests
uses: ./.github/workflows/e2e-test-fusionauth-latest-ios-latest.yml
# This job creates or finalizes a prerelease pull request or finalizes a release pull request
# and provides the necessary outputs for the subsequent jobs
prerelease-prep:
name: Create Prerelease Pull Request
runs-on: ubuntu-latest
needs: [ label-check, initial-e2e-test ]
outputs:
# This output is used to determine if a release was created
releases_created: ${{ steps.release.outputs.releases_created }}
# This output is used to determine the tag name of the release
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- id: release
name: Run prerelease release-please
uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
with:
config-file: ".github/prerelease-config.json"
manifest-file: ".github/prerelease-manifest.json"
token: ${{ secrets.RELEASE_WORKFLOW_TOKEN }}
# This job runs tests before the creation of the prerelease
prerelease-test:
name: Run Prerelease Tests
runs-on: ubuntu-latest
needs: [ prerelease-prep ]
# This job runs only if there was no release created
if: ${{ needs.prerelease-prep.outputs.releases_created == 'false' }}
steps:
- name: End To End Test
run: |
echo "Running end to end tests for prerelease!"
# This job runs the E2E tests with FusionAuth Matrix as a prerequisite for creating the prerelease
prerelease-e2e-test-fusionauth-matrix:
name: Run Prerelease E2E Tests with FusionAuth Matrix
needs: [ prerelease-prep ]
# This job runs only if there was no release created
if: ${{ needs.prerelease-prep.outputs.releases_created == 'false' }}
uses: ./.github/workflows/e2e-test-fusionauth-matrix-ios-latest.yml
# This job runs the E2E tests with iOS Matrix as a prerequisite for creating the prerelease
prerelease-e2e-test-ios-matrix:
name: Run Prerelease E2E Tests with iOS Matrix
needs: [ prerelease-prep ]
# This job runs only if there was no release created
if: ${{ needs.prerelease-prep.outputs.releases_created == 'false' }}
uses: ./.github/workflows/e2e-test-fusionauth-latest-ios-matrix.yml
# This job runs creates the Prerelease and creates a subsequent Release Pull Request
prerelease:
name: Create Prerelease and Release Pull Request
runs-on: ubuntu-latest
needs: [ prerelease-prep ]
# This job runs only if a release was created and the tag name contains 'rc'
if: ${{ needs.prerelease-prep.outputs.releases_created == 'true' && contains(needs.prerelease-prep.outputs.tag_name, 'rc') }}
steps:
- name: Pre Release Step
run: |
echo "Running pre-release step!"
- name: Run release release-please
uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
with:
config-file: ".github/release-config.json"
manifest-file: ".github/release-manifest.json"
token: ${{ secrets.RELEASE_WORKFLOW_TOKEN }}
# This job runs post-prerelease steps
post-prerelease:
name: Post Prerelease Steps
runs-on: ubuntu-latest
needs: [ prerelease ]
# This job runs only if a release was created and the tag name contains 'rc'
if: ${{ needs.prerelease-prep.outputs.releases_created == 'true' && contains(needs.prerelease-prep.outputs.tag_name, 'rc') }}
steps:
- name: Post Prerelease Step
run: |
echo "Running post-prerelease steps!"
# This job creates the final release and Syncs the prerelease manifest
release:
name: Create Release
runs-on: ubuntu-latest
needs: [ prerelease-prep ]
# This job runs only if a release was created and the tag name does not contain 'rc'
if: ${{ needs.prerelease-prep.outputs.releases_created == 'true' && !contains(needs.prerelease-prep.outputs.tag_name, 'rc') }}
steps:
- name: Release Step
run: |
echo "Running release step!"
# This job runs post-release steps
post-release:
name: Post Release Steps
runs-on: ubuntu-latest
needs: [ release ]
# This job runs only if a release was created and the tag name does not contain 'rc'
if: ${{ needs.prerelease-prep.outputs.releases_created == 'true' && !contains(needs.prerelease-prep.outputs.tag_name, 'rc') }}
steps:
- name: Post Release Step
run: |
echo "Running post-release steps!"