bump: v1.0.3 #19
Workflow file for this run
This file contains hidden or 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*" | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: "12.0" | |
| jobs: | |
| release: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| arch: arm64 | |
| - target: x86_64-apple-darwin | |
| arch: x64 | |
| runs-on: macos-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Install Tauri CLI | |
| run: cargo install tauri-cli --locked | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Import Apple certificate | |
| env: | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| run: | | |
| if [ -z "$APPLE_CERTIFICATE" ]; then | |
| echo "No certificate provided, skipping" | |
| exit 0 | |
| fi | |
| echo "$APPLE_CERTIFICATE" | base64 --decode > certificate.p12 | |
| security create-keychain -p actions build.keychain | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p actions build.keychain | |
| security set-keychain-settings -t 3600 -u build.keychain | |
| security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign | |
| security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k actions build.keychain | |
| rm certificate.p12 | |
| - name: Generate changelog | |
| id: changelog | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Use GitHub's auto-generated release notes (includes PR titles, | |
| # authors, commit links, and "New Contributors" section). | |
| PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | |
| if [ -n "$PREV_TAG" ]; then | |
| BODY=$(gh api repos/${{ github.repository }}/releases/generate-notes \ | |
| -f tag_name="${{ github.ref_name }}" \ | |
| -f previous_tag_name="$PREV_TAG" \ | |
| --jq '.body') | |
| else | |
| BODY=$(gh api repos/${{ github.repository }}/releases/generate-notes \ | |
| -f tag_name="${{ github.ref_name }}" \ | |
| --jq '.body') | |
| fi | |
| if [ -z "$BODY" ]; then | |
| BODY="Bug fixes and improvements." | |
| fi | |
| { | |
| echo "body<<CHANGELOG_EOF" | |
| echo "$BODY" | |
| echo "CHANGELOG_EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Build desktop app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| with: | |
| tagName: ${{ github.ref_name }} | |
| releaseName: "HarnessKit ${{ github.ref_name }}" | |
| releaseBody: ${{ steps.changelog.outputs.body || 'Bug fixes and improvements.' }} | |
| releaseDraft: true | |
| prerelease: false | |
| tauriScript: cargo tauri | |
| args: --target ${{ matrix.target }} | |
| - name: Build CLI | |
| run: cargo build --release --target ${{ matrix.target }} -p hk-cli | |
| - name: Upload CLI to release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cp "target/${{ matrix.target }}/release/hk" "hk-macos-${{ matrix.arch }}" | |
| gh release upload "${{ github.ref_name }}" "hk-macos-${{ matrix.arch }}" --clobber |