Skip to content

Commit 523bf10

Browse files
committed
[setup-workflows] Add common workflows for versioning and release
1 parent 4c2a4d0 commit 523bf10

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Release
22

33
on:
44
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*'
58
release:
69
types: [published]
710

@@ -10,11 +13,9 @@ jobs:
1013
name: Build for macos-universal
1114
runs-on: macos-14
1215
steps:
13-
- name: Set Xcode version
14-
run: sudo xcode-select -s /Applications/Xcode_16.2.app
1516
- uses: swift-actions/setup-swift@v2
1617
with:
17-
swift-version: "6.0"
18+
swift-version: "5.10"
1819
- uses: actions/checkout@v4
1920
- name: Install the binary
2021
run: ./install.sh
@@ -64,7 +65,6 @@ jobs:
6465
run: echo "checksum=$(swift package compute-checksum xcode-selective-test.artifactbundle.zip)" >> "$GITHUB_OUTPUT"
6566

6667
deploy-binary:
67-
if: ${{ github.event_name == 'release' }}
6868
needs: [check-portability, make-artifact-bundle]
6969
runs-on: ubuntu-latest
7070
steps:
@@ -79,7 +79,7 @@ jobs:
7979
```swift
8080
.binaryTarget(
8181
name: "xcode-selective-test",
82-
url: "https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/xcode-selective-test.artifactbundle.zip",
82+
url: "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/xcode-selective-test.artifactbundle.zip",
8383
checksum: "${{ needs.make-artifact-bundle.outputs.checksum }}"
8484
)
8585
```

.github/workflows/tag-version.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Tag Version
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
tag:
10+
uses: fetch-rewards/common-workflows/.github/workflows/increment-semantic-version.yml@main
11+
with:
12+
version-type: patch
13+
use-app-token: true # Required to trigger the release workflow
14+
secrets: inherit

0 commit comments

Comments
 (0)