Release #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Release" | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag name (e.g. v1.0.0)' | |
required: true | |
type: string | |
# Add permissions block | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
target: | |
- target: linux | |
os: ubuntu-latest | |
make: bash scripts/build-linux.sh | |
package: echo "Linux packaging is done in build step" | |
- target: macos | |
os: macos-latest | |
make: bash scripts/build-macos.sh | |
package: bash scripts/package-macos.sh | |
runs-on: ${{ matrix.target.os }} | |
environment: signing | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- uses: DeterminateSystems/flake-checker-action@main | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
env-vars: CARGO USE_VENDOR_FEATURE | |
- name: Build | |
run: nix develop --command bash -c "${{ matrix.target.make }}" | |
- name: Sign macOS | |
if: matrix.target.target == 'macos' | |
env: | |
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} | |
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
MACOS_CERTIFICATE_NAME: ${{ secrets.MACOS_CERTIFICATE_NAME }} | |
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.MACOS_CI_KEYCHAIN_PWD }} | |
MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }} | |
MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }} | |
MACOS_NOTARIZATION_PWD: ${{ secrets.MACOS_NOTARIZATION_PWD }} | |
run: nix develop --command bash -c "scripts/sign-macos.sh" | |
- name: Package DMG | |
if: matrix.target.target == 'macos' | |
run: nix develop --command bash -c "${{ matrix.target.package }}" | |
- name: Create Release and Upload Assets | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Release ${{ github.event.inputs.tag || github.ref_name }} | |
tag_name: ${{ github.event.inputs.tag || github.ref_name }} | |
draft: true | |
prerelease: false | |
generate_release_notes: true | |
files: | | |
target/release/macos/harbor.dmg | |
target/release/linux/Harbor-*-x86_64.AppImage |