Skip to content

Commit

Permalink
Add deb repository upload to autobuild
Browse files Browse the repository at this point in the history
  • Loading branch information
ann0see committed Feb 14, 2023
1 parent 39a47eb commit 195ae63
Showing 1 changed file with 49 additions and 57 deletions.
106 changes: 49 additions & 57 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,13 @@ jobs:
# Think of this like a foreach loop. Basically runs the steps with every combination of
# the contents of this.
config:
- config_name: Android .apk (artifact+codeQL)
target_os: android
building_on_os: ubuntu-20.04
base_command: ./.github/autobuild/android.sh
run_codeql: true
is_main_build_target: true
# Jamulus.pro needs to count git history length for android versioning:
checkout_fetch_depth: '0'

- config_name: Linux .deb amd64 (artifacts+codeQL)
target_os: linux
building_on_os: ubuntu-22.04
building_container: ubuntu:18.04
base_command: ./.github/autobuild/linux_deb.sh
run_codeql: true
run_codeql: false
is_main_build_target: true

- config_name: Linux .deb armhf (artifacts)
Expand All @@ -224,54 +216,6 @@ jobs:
base_command: TARGET_ARCH=arm64 ./.github/autobuild/linux_deb.sh
run_codeql: false

- config_name: MacOS (artifacts)
target_os: macos
building_on_os: macos-12
base_command: QT_VERSION=6.4.2 SIGN_IF_POSSIBLE=1 TARGET_ARCHS="x86_64 arm64" ./.github/autobuild/mac.sh
# Disable CodeQL on mac as it interferes with signing the binaries (signing hangs, see #2563 and #2564)
run_codeql: false
# Latest Xcode which runs on macos-11:
xcode_version: 13.4.1
is_main_build_target: true

# Reminder: If Legacy is removed, be sure to add a dedicated job for CodeQL again.
- config_name: MacOS Legacy (artifacts+CodeQL)
target_os: macos
building_on_os: macos-10.15
base_command: QT_VERSION=5.9.9 SIGN_IF_POSSIBLE=0 ARTIFACT_SUFFIX=_legacy ./.github/autobuild/mac.sh
# Enable CodeQL on mac legacy as this version does not get signed
run_codeql: true
# For Qt5 on Mac, we need to ensure SDK 10.15 is used, and not SDK 11.x.
# Xcode 12.1 is the most-recent release which still ships SDK 10.15:
# https://developer.apple.com/support/xcode/
# Xcode 12.1.1 is the most-recent 12.1.x release:
# https://xcodereleases.com/
xcode_version: 12.1.1
is_main_build_target: true

- config_name: iOS (artifacts)
target_os: ios
building_on_os: macos-10.15
base_command: QT_VERSION=5.15.2 ./.github/autobuild/ios.sh
# Build failed with CodeQL enabled when last tested 03/2022 (#2490).
# There are no hints that iOS is supposed to be supported by CodeQL.
# Therefore, disable it:
run_codeql: false
xcode_version: 12.1.1

- config_name: Windows (artifact+codeQL)
target_os: windows
building_on_os: windows-2022
base_command: powershell .\.github\autobuild\windows.ps1 -Stage
run_codeql: true
is_main_build_target: true

- config_name: Windows JACK (artifact)
target_os: windows
building_on_os: windows-2022
base_command: powershell .\.github\autobuild\windows.ps1 -BuildOption jackonwindows -Stage
run_codeql: false

# This injects the build_all_targets information into each matrix output:
build_all_targets:
- ${{ needs.create_release.outputs.build_all_targets }}
Expand Down Expand Up @@ -442,3 +386,51 @@ jobs:
- name: Perform CodeQL Analysis
if: matrix.config.run_codeql
uses: github/codeql-action/analyze@v2

create_deb_repo:
name: Create files for .deb repository
runs-on: ubuntu-22.04
needs: [create_release, release_assets]
if: needs.create_release.outputs.publish_to_release == 'true'
# Set permissions to allow uploading artifact, uploading to release
permissions:
checks: write
contents: write
steps:
- name: Import GPG key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
set -eu
[[ "${GPG_PRIVATE_KEY:-}" ]] || {
echo "Missing Github secret GPG_PRIVATE_KEY"
exit 1
}
mkdir -p gpghome
chmod 700 gpghome
echo "${GPG_PRIVATE_KEY}" | gpg --homedir gpghome --import -
# Unfortunately download-artifact action doesn't support wild card downloads. Thus downloading all artifacts
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Create debian repository
run: |
set -eu
mkdir repo
mv *.deb repo/
# In the repo subfolder create all needed metadata files
cd repo
apt-ftparchive packages . > Packages
apt-ftparchive release . > Release
gpg --homedir "../gpghome" --armor --yes --clearsign --output InRelease --detach-sign Release
gpg --homedir "../gpghome" --armor --export > "key.asc"
cd ..
- name: Upload deb repo metadata
uses: actions/upload-artifact@v3
with:
name: repo-metadata
path: repo

0 comments on commit 195ae63

Please sign in to comment.