Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: make release builds agnostic of runner version #525

Merged
merged 1 commit into from
Apr 17, 2024
Merged
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
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Setup | Apple codesign
if: matrix.os == 'macos-latest'
if: startsWith(matrix.os, 'macos-')
env:
LOCAL_KEYCHAIN_PASSWORD: ${{ secrets.LOCAL_KEYCHAIN_PASSWORD }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
Expand Down Expand Up @@ -127,29 +127,29 @@ jobs:
# problem, we remove the cached Lassie version to force `cargo build` to re-run the build
# script, which will copy `golassie.dll`.
- name: Debugging | Force rebuild of Lassie
if: ${{ !startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest' }}
if: ${{ !startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'windows-') }}
run: cargo clean --release --target ${{ matrix.target }} -p lassie

- name: Build | Build
run: ${{ matrix.builder || 'cargo' }} build --release --locked --target ${{ matrix.target }}

- name: Post Build | Prepare artifacts [Windows]
if: matrix.os == 'windows-latest'
if: startsWith(matrix.os, 'windows-')
run: |
cd target/${{ matrix.target }}/release
dir
7z a ../../../zinnia-${{ matrix.name }} zinnia.exe golassie.dll
7z a ../../../zinniad-${{ matrix.name }} zinniad.exe golassie.dll

- name: Post Build | Prepare artifacts [Linux]
if: matrix.os == 'ubuntu-latest'
if: startsWith(matrix.os, 'ubuntu-')
run: |
cd target/${{ matrix.target }}/release
tar czvf ../../../zinnia-${{ matrix.name }} zinnia
tar czvf ../../../zinniad-${{ matrix.name }} zinniad

- name: Post Build | Sign the executables [macOS]
if: matrix.os == 'macos-latest'
if: startsWith(matrix.os, 'macos-')
env:
LOCAL_KEYCHAIN_PASSWORD: ${{ secrets.LOCAL_KEYCHAIN_PASSWORD }}
MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
Expand All @@ -176,14 +176,14 @@ jobs:
target/${{ matrix.target }}/release/zinniad

- name: Post Build | Prepare artifacts [macOS]
if: matrix.os == 'macos-latest'
if: startsWith(matrix.os, 'macos-')
run: |
cd target/${{ matrix.target }}/release
zip ../../../zinnia-${{ matrix.name }} zinnia
zip ../../../zinniad-${{ matrix.name }} zinniad

- name: Post Build | Notarize the executables [macOS]
if: matrix.os == 'macos-latest'
if: startsWith(matrix.os, 'macos-')
run: |
xcrun notarytool submit zinnia-${{ matrix.name }} --wait \
--apple-id ${{ secrets.APPLE_ID }} \
Expand Down
Loading