Skip to content

Commit

Permalink
feat: build zinniad release binaries
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
  • Loading branch information
bajtos committed Mar 29, 2023
1 parent 49e9b55 commit da00e35
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,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 @@ -93,13 +93,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 @@ -121,21 +123,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 }}"

0 comments on commit da00e35

Please sign in to comment.