Skip to content

Commit

Permalink
Update release pipelines to upload release artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
conradev committed Mar 23, 2024
1 parent 4334f8c commit 6464baf
Show file tree
Hide file tree
Showing 43 changed files with 529 additions and 41 deletions.
7 changes: 4 additions & 3 deletions .github/actions/archive/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ runs:
run: |
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
xcodebuild archive \
xcodebuild clean archive \
-allowProvisioningUpdates \
-allowProvisioningDeviceRegistration \
-skipPackagePluginValidation \
-skipMacroValidation \
-onlyUsePackageVersionsFromResolvedFile \
-authenticationKeyID ${{ inputs.app-store-key-id }} \
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
Expand All @@ -38,6 +41,4 @@ runs:
-archivePath '${{ inputs.archive-path }}' \
-resultBundlePath BuildResults.xcresult
./Tools/xcresulttool-github BuildResults.xcresult
rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8
2 changes: 1 addition & 1 deletion .github/actions/build-for-testing/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
runs:
using: composite
steps:
- name: Cache Swift Packages
- name: Xcode Cache
uses: actions/cache@v3
with:
path: |
Expand Down
5 changes: 2 additions & 3 deletions .github/actions/export/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Notarize
name: Export
inputs:
app-store-key:
description: App Store key in PEM PKCS#8 format
Expand All @@ -24,8 +24,7 @@ inputs:
runs:
using: composite
steps:
- id: notarize
shell: bash
- shell: bash
working-directory: Apple
run: |
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
Expand Down
58 changes: 58 additions & 0 deletions .github/actions/notarize/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Notarize
inputs:
app-store-key:
description: App Store key in PEM PKCS#8 format
required: true
app-store-key-id:
description: App Store key ID
required: true
app-store-key-issuer-id:
description: App Store key issuer ID
required: true
archive-path:
description: Xcode archive path
required: true
export-path:
description: The path to export the archive to
required: true
outputs:
notarized-app:
description: The compressed and notarized app
value: ${{ steps.notarize.outputs.notarized-app }}
runs:
using: composite
steps:
- id: notarize
shell: bash
working-directory: Apple
run: |
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
echo '{"destination":"upload","method":"developer-id"}' \
| plutil -convert xml1 -o ExportOptions.plist -
xcodebuild \
-exportArchive \
-allowProvisioningUpdates \
-allowProvisioningDeviceRegistration \
-authenticationKeyID ${{ inputs.app-store-key-id }} \
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
-archivePath '${{ inputs.archive-path }}' \
-exportOptionsPlist ExportOptions.plist
until xcodebuild \
-exportNotarizedApp \
-allowProvisioningUpdates \
-allowProvisioningDeviceRegistration \
-authenticationKeyID ${{ inputs.app-store-key-id }} \
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
-archivePath '${{ inputs.archive-path }}' \
-exportPath ${{ inputs.export-path }}
do
echo "Failed to export app, trying again in 10s..."
sleep 10
done
rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8 ExportOptions.plist
3 changes: 1 addition & 2 deletions .github/workflows/build-apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
build:
name: Build App (${{ matrix.platform }})
runs-on: macos-13
runs-on: macos-14
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -53,7 +53,6 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ join(matrix.rust-targets, ', ') }}
- name: Build
id: build
Expand Down
109 changes: 82 additions & 27 deletions .github/workflows/release-apple.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,120 @@
name: Build Apple Release
on:
release:
types:
- created
on: workflow_dispatch
concurrency:
group: ${{ github.workflow }}
jobs:
build:
name: Build ${{ matrix.configuration['platform'] }} Release
runs-on: macos-13
name: Build ${{ matrix.platform }} Release
runs-on: macos-14
permissions:
contents: write
strategy:
fail-fast: false
matrix:
configuration:
- scheme: App (iOS)
destination: generic/platform=iOS
include:
- destination: generic/platform=iOS
platform: iOS
method: ad-hoc
artifact-file: Apple/Release/Burrow.ipa
- scheme: App (macOS)
destination: generic/platform=macOS
rust-targets:
- aarch64-apple-ios
- destination: generic/platform=macOS
platform: macOS
method: mac-application
artifact-file: Burrow.app.txz
rust-targets:
- x86_64-apple-darwin
- aarch64-apple-darwin
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
submodules: recursive
fetch-depth: 0
- name: Import Certificate
uses: ./.github/actions/import-cert
with:
certificate: ${{ secrets.DEVELOPER_CERT }}
password: ${{ secrets.DEVELOPER_CERT_PASSWORD }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ join(matrix.rust-targets, ', ') }}
- name: Archive
uses: ./.github/actions/archive
with:
scheme: ${{ matrix.configuration['scheme'] }}
destination: ${{ matrix.configuration['destination'] }}
scheme: App
destination: ${{ matrix.destination }}
app-store-key: ${{ secrets.APPSTORE_KEY }}
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
archive-path: Burrow.xcarchive
- name: Export Locally
- name: Upload
uses: ./.github/actions/export
with:
method: ${{ matrix.configuration['method'] }}
method: app-store
destination: upload
app-store-key: ${{ secrets.APPSTORE_KEY }}
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
archive-path: Burrow.xcarchive
export-path: Release
- name: Notarize
if: ${{ matrix.platform == 'macOS' }}
uses: ./.github/actions/notarize
with:
app-store-key: ${{ secrets.APPSTORE_KEY }}
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
archive-path: Burrow.xcarchive
- name: Export IPA
if: ${{ matrix.platform == 'iOS' }}
uses: ./.github/actions/export
with:
method: ad-hoc
destination: export
app-store-key: ${{ secrets.APPSTORE_KEY }}
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
archive-path: Burrow.xcarchive
export-path: Release
- name: Compress
if: ${{ matrix.configuration['platform'] == 'macOS' }}
- name: Compress (iOS)
if: ${{ matrix.platform == 'iOS' }}
shell: bash
run: tar --options xz:compression-level=9 -C Apple/Release -cJf Burrow.app.txz ./
- name: Attach Artifact
uses: SierraSoftworks/[email protected]
run: |
cp Apple/Release/Burrow.ipa -o Burrow.ipa
aa archive -a lzma -b 8m -d Apple -subdir Burrow.xcarchive -o Burrow-${{ matrix.platform }}.xcarchive.aar
rm -rf Apple/Release
- name: Compress (macOS)
if: ${{ matrix.platform == 'macOS' }}
shell: bash
run: |
aa archive -a lzma -b 8m -d Apple/Release -subdir Burrow.app -o Burrow.app.aar
aa archive -a lzma -b 8m -d Apple -subdir Burrow.xcarchive -o Burrow-${{ matrix.platform }}.xcarchive.aar
rm -rf Apple/Release
- name: Increment Build Number
id: version
shell: bash
run: |
BUILD_NUMBER=$(Tools/version.sh increment)
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_OUTPUT
- name: Attach Artifacts (iOS)
if: ${{ matrix.platform == 'iOS' }}
uses: SierraSoftworks/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }}
overwrite: 'true'
files: |
Burrow.ipa
Burrow-${{ matrix.platform }}.xcarchive.aar
- name: Attach Artifacts (macOS)
if: ${{ matrix.platform == 'macOS' }}
uses: SierraSoftworks/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
overwrite: 'false'
files: ${{ matrix.configuration['artifact-file'] }}
overwrite: 'true'
files: |
Burrow.aap.aar
Burrow-${{ matrix.platform }}.xcarchive.aar
release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }}
32 changes: 32 additions & 0 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Linux Release
on:
release:
types:
- created
jobs:
appimage:
name: Build AppImage
runs-on: ubuntu-latest
container: docker
steps:
- uses: actions/checkout@v4
- name: Build AppImage
run: |
docker build -t appimage-builder . -f burrow-gtk/build-aux/Dockerfile
docker create --name temp appimage-builder
docker cp temp:/app/burrow-gtk/build-appimage/Burrow-x86_64.AppImage .
docker rm temp
- name: Get Build Number
id: version
shell: bash
run: |
BUILD_NUMBER=$(Tools/version.sh)
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_OUTPUT
- name: Attach Artifacts
uses: SierraSoftworks/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }}
overwrite: 'true'
files: |
Burrow-x86_64.AppImage
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Apple/App/Assets.xcassets/AppIcon.appiconset/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Apple/App/Assets.xcassets/AppIcon.appiconset/20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6464baf

Please sign in to comment.