Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 30 additions & 16 deletions .github/actions/agent-package-mac/action.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
name: "Prepare klogg mac packages"
description: ""
inputs:
sign:
description: "Set to 'true' to code-sign and notarize (requires Apple Developer ID secrets). Defaults to unsigned."
required: false
default: "false"
p12-file-base64:
required: true
required: false
default: ""
p12-password:
required: true
required: false
default: ""
notarization-username:
required: true
required: false
default: ""
notarization-team:
required: true
required: false
default: ""
notarization-password:
required: true

required: false
default: ""

runs:
using: "composite"
steps:
- name: Mac prepare codesign
id: prepare-codesign
if: ${{ github.event_name != 'pull_request' }}
if: ${{ inputs.sign == 'true' }}
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ inputs.p12-file-base64 }}
Expand Down Expand Up @@ -50,37 +59,42 @@ runs:
echo "KLOGG_PKG=klogg-${{ env.KLOGG_VERSION }}-mac-${{ env.KLOGG_ARCH }}.pkg" >> $GITHUB_ENV

- name: Mac codesign binaries
if: ${{ github.event_name != 'pull_request' }}
if: ${{ inputs.sign == 'true' }}
shell: sh
run: |
cd $KLOGG_BUILD_ROOT
codesign -v -f -o runtime --deep --timestamp -s "${{ env.KLOGG_CODESIGN }}" ./output/klogg.app;

- name: Mac pack dmg
shell: sh
run: |
cd $KLOGG_BUILD_ROOT
cpack --verbose -G "DragNDrop"

- name: Mac codesign dmg
if: ${{ github.event_name != 'pull_request' }}
- name: Mac rename dmg
shell: sh
run: |
cd $KLOGG_BUILD_ROOT
mv ./packages/klogg-${{ env.KLOGG_VERSION }}-OSX.dmg ./packages/${{ env.KLOGG_DMG }}

- name: Mac codesign dmg
if: ${{ inputs.sign == 'true' }}
shell: sh
run: |
cd $KLOGG_BUILD_ROOT
codesign -v -f -o runtime --timestamp -s "${{ env.KLOGG_CODESIGN }}" ./packages/${{ env.KLOGG_DMG }}
- name: Mac notarize DMG
if: ${{ github.event_name != 'pull_request' }}

- name: Mac notarize DMG
if: ${{ inputs.sign == 'true' }}
shell: sh
run: |
xcrun notarytool submit --wait --apple-id "${{ inputs.notarization-username }}" --team-id "${{ inputs.notarization-team }}" --password "${{ inputs.notarization-password }}" "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_DMG }}" | tee dmg_notary.log
dmg_notary_id=$(awk '$1=="id:"{id=$2} END{print id}' dmg_notary.log)
xcrun notarytool log --apple-id "${{ inputs.notarization-username }}" --team-id "${{ inputs.notarization-team }}" --password "${{ inputs.notarization-password }}" "$dmg_notary_id" "dmg_notary.log.json"
cat "dmg_notary.log.json"

- name: Mac staple DMG
if: ${{ github.event_name != 'pull_request' }}
- name: Mac staple DMG
if: ${{ inputs.sign == 'true' }}
shell: sh
run: |
xcrun stapler staple "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_DMG }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/agent-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
echo "BOOST_URL=https://sourceforge.net/projects/boost/files/boost/1.86.0/boost_1_86_0.tar.bz2/download" >> $GITHUB_ENV

- name: Restore Boost cache
uses: actions/cache@v2
uses: actions/cache@v4
id: cache-boost
with:
path: ${{env.BOOST_ROOT}}
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/klogg-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ runs:
- name: Set klogg version
shell: sh
run: |
echo "KLOGG_VERSION=24.11.0.$((${{ github.run_number }} + 717))" >> $GITHUB_ENV
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
# Tag release: derive version from the tag name, e.g. v1.0.0 -> 1.0.0
echo "KLOGG_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
else
echo "KLOGG_VERSION=24.11.0.$((${{ github.run_number }} + 717))" >> $GITHUB_ENV
fi
2 changes: 1 addition & 1 deletion .github/actions/prepare-workspace-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
echo "KLOGG_WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
echo "KLOGG_BUILD_ROOT=build_root" >> $GITHUB_ENV
echo "KLOGG_ARCH=${{ matrix.config.arch }}" >> $GITHUB_ENV
echo "KLOGG_CMAKE_OPTS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DKLOGG_GENERIC_CPU=ON -DKLOGG_USE_SENTRY=ON -DCMAKE_INSTALL_PREFIX=/usr ${{ matrix.config.cmake_opts }}" >> $GITHUB_ENV
echo "KLOGG_CMAKE_OPTS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DKLOGG_GENERIC_CPU=ON -DKLOGG_USE_SENTRY=OFF -DCMAKE_INSTALL_PREFIX=/usr ${{ matrix.config.cmake_opts }}" >> $GITHUB_ENV

- name: Set qt env var
if: "startsWith(matrix.config.qt_version, '5')"
Expand Down
58 changes: 43 additions & 15 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: "CI Build"
on:
push:
branches: [ master ]
tags: [ 'v*' ]
paths-ignore:
- 'website/**'
- BUILD.md
Expand All @@ -28,13 +29,13 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/klogg-version

- name: Save version
run: echo $KLOGG_VERSION > klogg_version.txt

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: klogg_version
path: 'klogg_version.txt'
Expand Down Expand Up @@ -118,7 +119,7 @@ jobs:

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

#- uses: satackey/action-docker-layer-caching@v0.0.11
# # Ignore the failure of a step and avoid terminating the job.
Expand All @@ -136,7 +137,7 @@ jobs:
- uses: ./.github/actions/docker-package

# Final upload of all packages
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.config.artifacts_id }}
path: '${{ env.KLOGG_BUILD_ROOT }}/packages/*'
Expand Down Expand Up @@ -167,7 +168,7 @@ jobs:

runs-on: ${{ matrix.config.os }}-${{ matrix.config.os_version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Xcode
shell: sh
Expand All @@ -190,14 +191,10 @@ jobs:
- uses: ./.github/actions/agent-build
- uses: ./.github/actions/agent-run-tests
- uses: ./.github/actions/agent-package-mac
with:
p12-file-base64: ${{ secrets.CODESIGN_BASE64 }}
p12-password: ${{ secrets.CODESIGN_PASSWORD }}
notarization-username: ${{ secrets.NOTARIZATION_USERNAME }}
notarization-team: ${{ secrets.NOTARIZATION_TEAM }}
notarization-password: ${{ secrets.NOTARIZATION_PASSWORD }}
# Unsigned build (sign defaults to 'false'). To produce signed/notarized
# artifacts, set `sign: 'true'` and supply the Apple Developer ID secrets.

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.config.artifacts_id }}
path: '${{ env.KLOGG_BUILD_ROOT }}/packages/*'
Expand Down Expand Up @@ -229,11 +226,11 @@ jobs:

runs-on: ${{ matrix.config.os }}-${{ matrix.config.os_version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache openssl
id: cache-openssl
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ github.workspace }}\openssl-1.1
key: OpensslCache-1-1-1w
Expand Down Expand Up @@ -268,8 +265,39 @@ jobs:
s3-bucket: ${{ secrets.WIN_CS_BUCKET }}

# Final upload of all packages
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.config.artifacts_id }}
path: '${{ env.KLOGG_BUILD_ROOT }}/packages/*'
if-no-files-found: error

# Publish a GitHub Release when a tag like v1.0.0 is pushed.
# Uses the built-in GITHUB_TOKEN, so no extra secrets are required.
Release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [ Linux, Mac, Windows ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all platform artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: packages-*

- name: Generate checksums
run: |
cd artifacts
find . -type f -print0 | xargs -0 sha256sum > ../SHA256SUMS.txt
cat ../SHA256SUMS.txt

- name: Publish release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/**/*
SHA256SUMS.txt
generate_release_notes: true
prerelease: false
fail_on_unmatched_files: true
154 changes: 0 additions & 154 deletions .github/workflows/ci-release.yml

This file was deleted.

Loading