Skip to content

Commit

Permalink
SDKCI-170 Align release branch naming for iOS publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Kylmakalle committed Nov 2, 2023
1 parent b70708c commit 24b7bb9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/create_new_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ on:
jobs:
create-new-release:
if: |
startsWith(github.head_ref, 'release-v') &&
startsWith(github.base_ref, 'main') &&
github.event.pull_request.merged
github.event.pull_request.merged &&
(startsWith(github.head_ref, 'release-v') ||
startsWith(github.head_ref, 'release/v')) &&
startsWith(github.base_ref, 'main')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create release
run: |
VERSION=$(echo "${{github.head_ref}}" | sed "s/^release-//")
VERSION=$(echo "${{github.head_ref}}" | sed -E "s/^release[\/-]//")
gh release create $VERSION --notes "Bump to $VERSION" --title "Release-$VERSION" --target "${{github.head_ref}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 6 additions & 4 deletions .github/workflows/merge_release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ on:
jobs:
approve-release-pull-request:
if: |
startsWith(github.head_ref, 'release-v') &&
startsWith(github.base_ref, 'main') &&
(startsWith(github.head_ref, 'release-v') ||
startsWith(github.head_ref, 'release/v')) &&
startsWith(github.base_ref, 'main')
startsWith(github.event.pull_request.user.login, 'mapbox-github-ci-writer-public-') &&
github.event.pull_request.user.id == '93400552'
runs-on: ubuntu-latest
Expand All @@ -19,8 +20,9 @@ jobs:
PR: ${{ github.event.pull_request.html_url }}
re-trigger-circleci-for-cocoapods:
if: |
startsWith(github.head_ref, 'release-v') &&
startsWith(github.base_ref, 'main') &&
(startsWith(github.head_ref, 'release-v') ||
startsWith(github.head_ref, 'release/v')) &&
startsWith(github.base_ref, 'main')
startsWith(github.event.pull_request.user.login, 'mapbox-github-ci-writer-public-') &&
github.event.pull_request.user.id == '93400552'
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/Sources/set-marketing-version/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ struct MarketingVersion: ParsableCommand {

func runSPMVersionUpdate() throws {
let spmManifestURL = projectPathURL.appendingPathComponent("Tests/Integration/SPM/project.yml")
try replaceLineContaining("branch: release-v",
with: " branch: release-v\(marketingVersion)",
try replaceLineContaining("branch: release/v",
with: " branch: release/v\(marketingVersion)",
in: spmManifestURL)
let spmPackageURL = projectPathURL.appendingPathComponent("Package.swift")
try replaceLineContaining("let version =",
Expand Down

0 comments on commit 24b7bb9

Please sign in to comment.