Repository navigation
70 lines (54 loc) · 1.71 KB
/
Copy pathrelease.yml
File metadata and controls
70 lines (54 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release validation
on:
push:
tags:
- "v*"
permissions:
contents: read
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
validate:
runs-on: macos-26
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "26.6"
- name: Validate semantic version tag
shell: bash
run: |
if [[ ! "$GITHUB_REF_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z][0-9A-Za-z.-]*)?$ ]]; then
echo "Expected a semantic version tag with a v prefix" >&2
exit 1
fi
version="${GITHUB_REF_NAME#v}"
if ! grep -Fq "from: \"$version\"" README.md; then
echo "README installation version does not match $GITHUB_REF_NAME" >&2
exit 1
fi
if ! grep -Fq "## $version" CHANGELOG.md; then
echo "CHANGELOG does not contain a $version release" >&2
exit 1
fi
if ! grep -Fq "messagevisorSwiftVersion = \"$version\"" Sources/MessagevisorCLI/main.swift; then
echo "Swift CLI version does not match $GITHUB_REF_NAME" >&2
exit 1
fi
echo "Validating Messagevisor Swift $version"
- name: Show toolchain versions
run: |
swift --version
xcodebuild -version
- name: Test
run: swift test
- name: Check Swift 6 concurrency
run: make strict-concurrency
- name: Build release products
run: swift build -c release
- name: Verify clean package consumers
run: make verify-consumers