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 4aa21c5
Show file tree
Hide file tree
Showing 52 changed files with 591 additions and 74 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
7 changes: 2 additions & 5 deletions .github/actions/test-without-building/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@ inputs:
runs:
using: composite
steps:
- shell: bash
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- shell: bash
working-directory: Apple
run: |
xcodebuild test-without-building \
-scheme '${{ inputs.scheme }}' \
-destination '${{ inputs.destination }}' \
${{ inputs.test-plan && '-testPlan ' }}${{ inputs.test-plan }} \
-resultBundlePath "${{ inputs.artifact-prefix }}-${{ steps.vars.outputs.sha_short }}.xcresult"
-resultBundlePath "${{ inputs.artifact-prefix }}.xcresult"
- uses: kishikawakatsumi/xcresulttool@v1
if: always()
with:
path: Apple/${{ inputs.artifact-prefix }}-${{ steps.vars.outputs.sha_short }}.xcresult
path: Apple/${{ inputs.artifact-prefix }}.xcresult
title: ${{ inputs.check-name }}
show-passed-tests: false
7 changes: 5 additions & 2 deletions .github/workflows/build-appimage.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Build AppImage
on:
push:
branches: [main]
branches:
- main
pull_request:
branches:
- "*"
jobs:
appimage:
name: Build AppImage
Expand All @@ -17,7 +20,7 @@ jobs:
docker cp temp:/app/burrow-gtk/build-appimage/Burrow-x86_64.AppImage .
docker rm temp
- uses: actions/upload-artifact@v4
name: Upload to GitHub
with:
name: AppImage
path: Burrow-x86_64.AppImage

9 changes: 4 additions & 5 deletions .github/workflows/build-apple.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Apple Build
name: Build Apple Apps
on:
push:
branches:
Expand All @@ -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 All @@ -64,7 +63,7 @@ jobs:
app-store-key: ${{ secrets.APPSTORE_KEY }}
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
- name: Xcode Unit Test
- name: Run Unit Tests
if: ${{ matrix.xcode-unit-test != '' }}
continue-on-error: true
uses: ./.github/actions/test-without-building
Expand All @@ -74,7 +73,7 @@ jobs:
test-plan: ${{ matrix.xcode-unit-test }}
artifact-prefix: unit-tests-${{ matrix.sdk-name }}
check-name: Xcode Unit Tests (${{ matrix.platform }})
- name: Xcode UI Test
- name: Run UI Tests
if: ${{ matrix.xcode-ui-test != '' }}
continue-on-error: true
uses: ./.github/actions/test-without-building
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
images: ghcr.io/${{ github.repository }}
tags: |
type=sha
type=match,pattern=builds/(.*),group=1
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and Push
uses: docker/build-push-action@v4
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/build-rpm.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
on: workflow_dispatch
name: Build RPM
on:
push:
branches: [ "main" ]
pull_request:
branches:
- "*"
jobs:
build:
name: Build RPM
Expand All @@ -20,4 +15,3 @@ jobs:
strip -s target/release/burrow
- name: Build RPM
run: cargo generate-rpm -p burrow

2 changes: 1 addition & 1 deletion .github/workflows/build-rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust Build
name: Build Rust Crate
on:
push:
branches:
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/lint-git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ jobs:
name: Git Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Install Gitlint
shell: bash
run: python -m pip install gitlint
- name: Run Gitlint
shell: bash
run: gitlint --commits "${{ github.event.pull_request.base.sha }}..HEAD"
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Install
shell: bash
run: python -m pip install gitlint
- name: Lint
shell: bash
run: gitlint --commits "${{ github.event.pull_request.base.sha }}..HEAD"
7 changes: 1 addition & 6 deletions .github/workflows/lint-swift.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Swift Lint
on:
push:
branches:
- main
pull_request:
branches:
- "*"
Expand All @@ -14,8 +11,6 @@ jobs:
image: ghcr.io/realm/swiftlint:latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
uses: actions/checkout@v4
- name: Lint
run: swiftlint lint --reporter github-actions-logging
34 changes: 34 additions & 0 deletions .github/workflows/release-appimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release (AppImage)
on:
release:
types:
- created
jobs:
appimage:
name: Build AppImage
runs-on: ubuntu-latest
container: docker
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
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: |
echo "BUILD_NUMBER=$(Tools/version.sh)" >> $GITHUB_OUTPUT
- name: Upload to GitHub
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

0 comments on commit 4aa21c5

Please sign in to comment.