Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ on:
pull_request:
workflow_dispatch:
workflow_call:
inputs:
ref:
description: Commit to check out when called by the release workflow
required: false
type: string

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || inputs.ref || github.ref }}
cancel-in-progress: true

env:
Expand All @@ -34,6 +39,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v7
with:
ref: ${{ inputs.ref || github.sha }}
persist-credentials: false

- name: Test SDK version validation
Expand Down Expand Up @@ -156,6 +162,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v7
with:
ref: ${{ inputs.ref || github.sha }}
persist-credentials: false

- name: Select iPhone simulator
Expand Down Expand Up @@ -218,6 +225,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v7
with:
ref: ${{ inputs.ref || github.sha }}
persist-credentials: false

- name: Download compiled SPM tests
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,27 @@ name: Release
on:
push:
tags: ['**']
workflow_dispatch:
inputs:
tag:
description: Existing release tag, for example 1.0.0
required: true
type: string

permissions:
contents: read

env:
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}

concurrency:
group: release-${{ github.ref }}
group: release-${{ inputs.tag || github.ref_name }}
cancel-in-progress: true

jobs:
version:
name: Release version
if: ${{ !github.event.deleted }}
if: ${{ github.event_name != 'push' || !github.event.deleted }}
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
Expand All @@ -23,6 +32,7 @@ jobs:
- name: Check out tagged commit
uses: actions/checkout@v7
with:
ref: refs/tags/${{ inputs.tag || github.ref_name }}
persist-credentials: false
fetch-depth: 0

Expand All @@ -43,14 +53,14 @@ jobs:
run: python3 -B -m unittest discover -s .github/scripts -p 'test_*.py' -v

- name: Validate SDK versions against tag
env:
RELEASE_TAG: ${{ github.ref_name }}
run: python3 .github/scripts/check-versions.py --tag "$RELEASE_TAG"

ci:
name: Release CI
needs: version
uses: ./.github/workflows/ci.yml
with:
ref: ${{ needs.version.outputs.commit }}

integration:
name: Release integration / ${{ matrix.manager }}
Expand All @@ -65,12 +75,12 @@ jobs:
DEVELOPER_DIR: /Applications/Xcode_26.5.app/Contents/Developer
COCOAPODS_DISABLE_STATS: 'true'
SDK_REPOSITORY_URL: https://github.com/${{ github.repository }}.git
RELEASE_TAG: ${{ github.ref_name }}
PACKAGE_MANAGER: ${{ matrix.manager }}
steps:
- name: Check out tagged commit
uses: actions/checkout@v7
with:
ref: ${{ needs.version.outputs.commit }}
persist-credentials: false

- name: Show tool versions
Expand Down Expand Up @@ -147,7 +157,6 @@ jobs:
- name: Publish release for the verified tag
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.ref_name }}
EXPECTED_COMMIT: ${{ needs.version.outputs.commit }}
SDK_REPOSITORY_URL: https://github.com/${{ github.repository }}.git
run: bash .github/scripts/publish-release.sh
Loading