Skip to content

Commit df57cff

Browse files
committed
Update release pipelines to upload release artifacts
1 parent 4334f8c commit df57cff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+567
-41
lines changed

.github/actions/archive/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ runs:
2626
run: |
2727
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
2828
29-
xcodebuild archive \
29+
xcodebuild clean archive \
3030
-allowProvisioningUpdates \
3131
-allowProvisioningDeviceRegistration \
32+
-skipPackagePluginValidation \
33+
-skipMacroValidation \
34+
-onlyUsePackageVersionsFromResolvedFile \
3235
-authenticationKeyID ${{ inputs.app-store-key-id }} \
3336
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
3437
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
@@ -38,6 +41,4 @@ runs:
3841
-archivePath '${{ inputs.archive-path }}' \
3942
-resultBundlePath BuildResults.xcresult
4043
41-
./Tools/xcresulttool-github BuildResults.xcresult
42-
4344
rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8

.github/actions/build-for-testing/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ inputs:
1818
runs:
1919
using: composite
2020
steps:
21-
- name: Cache Swift Packages
21+
- name: Xcode Cache
2222
uses: actions/cache@v3
2323
with:
2424
path: |

.github/actions/export/action.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Notarize
1+
name: Export
22
inputs:
33
app-store-key:
44
description: App Store key in PEM PKCS#8 format
@@ -24,8 +24,7 @@ inputs:
2424
runs:
2525
using: composite
2626
steps:
27-
- id: notarize
28-
shell: bash
27+
- shell: bash
2928
working-directory: Apple
3029
run: |
3130
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8

.github/actions/notarize/action.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Notarize
2+
inputs:
3+
app-store-key:
4+
description: App Store key in PEM PKCS#8 format
5+
required: true
6+
app-store-key-id:
7+
description: App Store key ID
8+
required: true
9+
app-store-key-issuer-id:
10+
description: App Store key issuer ID
11+
required: true
12+
archive-path:
13+
description: Xcode archive path
14+
required: true
15+
export-path:
16+
description: The path to export the archive to
17+
required: true
18+
outputs:
19+
notarized-app:
20+
description: The compressed and notarized app
21+
value: ${{ steps.notarize.outputs.notarized-app }}
22+
runs:
23+
using: composite
24+
steps:
25+
- id: notarize
26+
shell: bash
27+
working-directory: Apple
28+
run: |
29+
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
30+
31+
echo '{"destination":"upload","method":"developer-id"}' \
32+
| plutil -convert xml1 -o ExportOptions.plist -
33+
34+
xcodebuild \
35+
-exportArchive \
36+
-allowProvisioningUpdates \
37+
-allowProvisioningDeviceRegistration \
38+
-authenticationKeyID ${{ inputs.app-store-key-id }} \
39+
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
40+
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
41+
-archivePath '${{ inputs.archive-path }}' \
42+
-exportOptionsPlist ExportOptions.plist
43+
44+
until xcodebuild \
45+
-exportNotarizedApp \
46+
-allowProvisioningUpdates \
47+
-allowProvisioningDeviceRegistration \
48+
-authenticationKeyID ${{ inputs.app-store-key-id }} \
49+
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
50+
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
51+
-archivePath '${{ inputs.archive-path }}' \
52+
-exportPath ${{ inputs.export-path }}
53+
do
54+
echo "Failed to export app, trying again in 10s..."
55+
sleep 10
56+
done
57+
58+
rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8 ExportOptions.plist

.github/workflows/build-appimage.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ jobs:
2020
with:
2121
name: AppImage
2222
path: Burrow-x86_64.AppImage
23-

.github/workflows/build-apple.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212
jobs:
1313
build:
1414
name: Build App (${{ matrix.platform }})
15-
runs-on: macos-13
15+
runs-on: macos-14
1616
strategy:
1717
fail-fast: false
1818
matrix:
@@ -53,7 +53,6 @@ jobs:
5353
- name: Install Rust
5454
uses: dtolnay/rust-toolchain@stable
5555
with:
56-
toolchain: stable
5756
targets: ${{ join(matrix.rust-targets, ', ') }}
5857
- name: Build
5958
id: build

.github/workflows/build-docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
images: ghcr.io/${{ github.repository }}
3434
tags: |
3535
type=sha
36+
type=match,pattern=builds/(.*),group=1
3637
type=raw,value=latest,enable={{is_default_branch}}
3738
- name: Build and Push
3839
uses: docker/build-push-action@v4

.github/workflows/release-apple.yml

Lines changed: 79 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,118 @@
1-
name: Build Apple Release
1+
name: Release (Apple)
22
on:
33
release:
44
types:
55
- created
66
jobs:
77
build:
8-
name: Build ${{ matrix.configuration['platform'] }} Release
9-
runs-on: macos-13
8+
name: Build ${{ matrix.platform }} Release
9+
runs-on: macos-14
10+
permissions:
11+
contents: write
1012
strategy:
1113
fail-fast: false
1214
matrix:
13-
configuration:
14-
- scheme: App (iOS)
15-
destination: generic/platform=iOS
15+
include:
16+
- destination: generic/platform=iOS
1617
platform: iOS
17-
method: ad-hoc
18-
artifact-file: Apple/Release/Burrow.ipa
19-
- scheme: App (macOS)
20-
destination: generic/platform=macOS
18+
rust-targets:
19+
- aarch64-apple-ios
20+
- destination: generic/platform=macOS
2121
platform: macOS
22-
method: mac-application
23-
artifact-file: Burrow.app.txz
22+
rust-targets:
23+
- x86_64-apple-darwin
24+
- aarch64-apple-darwin
2425
env:
2526
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
27+
GH_TOKEN: ${{ github.token }}
2628
steps:
2729
- name: Checkout
28-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
2931
with:
30-
ssh-key: ${{ secrets.DEPLOY_KEY }}
31-
submodules: recursive
32+
fetch-depth: 0
3233
- name: Import Certificate
3334
uses: ./.github/actions/import-cert
3435
with:
3536
certificate: ${{ secrets.DEVELOPER_CERT }}
3637
password: ${{ secrets.DEVELOPER_CERT_PASSWORD }}
38+
- name: Install Rust
39+
uses: dtolnay/rust-toolchain@stable
40+
with:
41+
targets: ${{ join(matrix.rust-targets, ', ') }}
3742
- name: Archive
3843
uses: ./.github/actions/archive
3944
with:
40-
scheme: ${{ matrix.configuration['scheme'] }}
41-
destination: ${{ matrix.configuration['destination'] }}
45+
scheme: App
46+
destination: ${{ matrix.destination }}
4247
app-store-key: ${{ secrets.APPSTORE_KEY }}
4348
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
4449
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
4550
archive-path: Burrow.xcarchive
46-
- name: Export Locally
51+
- name: Upload
4752
uses: ./.github/actions/export
4853
with:
49-
method: ${{ matrix.configuration['method'] }}
54+
method: app-store
55+
destination: upload
56+
app-store-key: ${{ secrets.APPSTORE_KEY }}
57+
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
58+
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
59+
archive-path: Burrow.xcarchive
60+
export-path: Release
61+
- name: Notarize
62+
if: ${{ matrix.platform == 'macOS' }}
63+
uses: ./.github/actions/notarize
64+
with:
65+
app-store-key: ${{ secrets.APPSTORE_KEY }}
66+
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
67+
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
68+
archive-path: Burrow.xcarchive
69+
- name: Export IPA
70+
if: ${{ matrix.platform == 'iOS' }}
71+
uses: ./.github/actions/export
72+
with:
73+
method: ad-hoc
5074
destination: export
5175
app-store-key: ${{ secrets.APPSTORE_KEY }}
5276
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
5377
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
5478
archive-path: Burrow.xcarchive
5579
export-path: Release
56-
- name: Compress
57-
if: ${{ matrix.configuration['platform'] == 'macOS' }}
80+
- name: Compress (iOS)
81+
if: ${{ matrix.platform == 'iOS' }}
5882
shell: bash
59-
run: tar --options xz:compression-level=9 -C Apple/Release -cJf Burrow.app.txz ./
60-
- name: Attach Artifact
61-
uses: SierraSoftworks/[email protected]
83+
run: |
84+
cp Apple/Release/Burrow.ipa -o Burrow.ipa
85+
aa archive -a lzma -b 8m -d Apple -subdir Burrow.xcarchive -o Burrow-${{ matrix.platform }}.xcarchive.aar
86+
rm -rf Apple/Release
87+
- name: Compress (macOS)
88+
if: ${{ matrix.platform == 'macOS' }}
89+
shell: bash
90+
run: |
91+
aa archive -a lzma -b 8m -d Apple/Release -subdir Burrow.app -o Burrow.app.aar
92+
aa archive -a lzma -b 8m -d Apple -subdir Burrow.xcarchive -o Burrow-${{ matrix.platform }}.xcarchive.aar
93+
rm -rf Apple/Release
94+
- name: Get Build Number
95+
id: version
96+
shell: bash
97+
run: |
98+
echo "BUILD_NUMBER=$(Tools/version.sh)" >> $GITHUB_OUTPUT
99+
- name: Attach Artifacts (iOS)
100+
if: ${{ matrix.platform == 'iOS' }}
101+
uses: SierraSoftworks/[email protected]
102+
with:
103+
token: ${{ secrets.GITHUB_TOKEN }}
104+
release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }}
105+
overwrite: 'true'
106+
files: |
107+
Burrow.ipa
108+
Burrow-${{ matrix.platform }}.xcarchive.aar
109+
- name: Attach Artifacts (macOS)
110+
if: ${{ matrix.platform == 'macOS' }}
111+
uses: SierraSoftworks/[email protected]
62112
with:
63113
token: ${{ secrets.GITHUB_TOKEN }}
64-
overwrite: 'false'
65-
files: ${{ matrix.configuration['artifact-file'] }}
114+
release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }}
115+
overwrite: 'true'
116+
files: |
117+
Burrow.aap.aar
118+
Burrow-${{ matrix.platform }}.xcarchive.aar
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Create Release If Needed
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 10 * * *'
6+
concurrency:
7+
group: ${{ github.workflow }}
8+
jobs:
9+
create:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- shell: bash
14+
run: |
15+
if [[ $(Tools/version.sh status) == "dirty" ]]; then
16+
gh workflow run release-now.yml
17+
fi

.github/workflows/release-linux.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release (Linux)
2+
on:
3+
release:
4+
types:
5+
- created
6+
jobs:
7+
appimage:
8+
name: Build AppImage
9+
runs-on: ubuntu-latest
10+
container: docker
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Build AppImage
17+
run: |
18+
docker build -t appimage-builder . -f burrow-gtk/build-aux/Dockerfile
19+
docker create --name temp appimage-builder
20+
docker cp temp:/app/burrow-gtk/build-appimage/Burrow-x86_64.AppImage .
21+
docker rm temp
22+
- name: Get Build Number
23+
id: version
24+
shell: bash
25+
run: |
26+
echo "BUILD_NUMBER=$(Tools/version.sh)" >> $GITHUB_OUTPUT
27+
- name: Attach Artifacts
28+
uses: SierraSoftworks/[email protected]
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }}
32+
overwrite: 'true'
33+
files: |
34+
Burrow-x86_64.AppImage

.github/workflows/release-now.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Create Release
2+
on: workflow_dispatch
3+
concurrency:
4+
group: ${{ github.workflow }}
5+
jobs:
6+
create:
7+
name: Create Release
8+
runs-on: ubuntu-latest
9+
steps:
10+
- shell: bash
11+
run: Tools/version.sh increment
684 Bytes
927 Bytes

0 commit comments

Comments
 (0)