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

feat: build zinniad release binaries #158

Merged
merged 1 commit into from
Mar 29, 2023
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
23 changes: 13 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
# List of platforms, this must be in sync with the list of platforms in ci.yaml
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: zinnia-linux-x64.tar.gz
name: linux-x64.tar.gz

- target: x86_64-apple-darwin
os: macos-latest
name: zinnia-macos-x64.zip
name: macos-x64.zip

- target: aarch64-apple-darwin
os: macos-latest
name: zinnia-macos-arm64.zip
name: macos-arm64.zip

- target: x86_64-pc-windows-msvc
os: windows-latest
name: zinnia-windows-x64.zip
name: windows-x64.zip

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -91,13 +91,15 @@ jobs:
if: matrix.os == 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
7z a ../../../${{ matrix.name }} zinnia.exe
7z a ../../../zinnia-${{ matrix.name }} zinnia.exe
7z a ../../../zinniad-${{ matrix.name }} zinniad.exe

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

- name: Post Build | Sign the executable [macOS]
if: matrix.os == 'macos-latest'
Expand All @@ -119,21 +121,22 @@ jobs:
if: matrix.os == 'macos-latest'
run: |
cd target/${{ matrix.target }}/release
zip ../../../${{ matrix.name }} zinnia
zip ../../../zinnia-${{ matrix.name }} zinnia
zip ../../../zinniad-${{ matrix.name }} zinniad

- name: Release | Upload artifacts
if: startsWith(github.ref, 'refs/tags/') # Don't create releases when debugging
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d
with:
draft: true
files: ${{ matrix.name }}
files: "*-${{ matrix.name }}"
fail_on_unmatched_files: true

# When debugging this workflow, attach the artifacts to the workflow run
- name: DEBUGGING | Upload artifacts to workflow run
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
name: archives-${{ matrix.name }}
path: "*-${{ matrix.name }}"