This repository was archived by the owner on Jul 4, 2026. It is now read-only.
Debug test build #9
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: Build Installer | |
| on: | |
| push: | |
| branches: [master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: write | |
| jobs: | |
| build_rust: | |
| name: ${{ matrix.platform.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - target: x86_64-pc-windows-gnu | |
| runs-on: windows-latest | |
| - target: x86_64-unknown-linux-musl | |
| runs-on: ubuntu-24.04 | |
| - target: x86_64-apple-darwin | |
| runs-on: macOS-latest | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - name: Checkout this repo | |
| uses: actions/checkout@v4 | |
| - name: Install cross (for Linux only) | |
| if: ${{ matrix.platform.target == 'x86_64-unknown-linux-musl' }} | |
| run: cargo install cross | |
| - name: Compile | |
| uses: houseabsolute/actions-rust-cross@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: "--bin penumbra --release" | |
| force-use-cross: ${{ matrix.platform.target == 'x86_64-unknown-linux-musl' }} | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: penumbra-installer-${{ matrix.platform.target }} | |
| path: | | |
| target/${{ matrix.platform.target }}/release/penumbra | |
| target/${{ matrix.platform.target }}/release/penumbra.exe | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| needs: build_rust | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Debug artifact structure | |
| run: | | |
| echo "=== Artifact structure ===" | |
| find artifacts -type f -ls | |
| echo "=== Files to upload ===" | |
| find artifacts -type f | |
| - name: Generate version for build | |
| run: | | |
| TODAY=$(date +'%Y-%m-%d') | |
| TODAY_CODE=$(date +'%Y%m%d') | |
| # Get all existing releases for today (fetch more to avoid pagination issues) | |
| EXISTING=$(gh release list --limit 100 --json tagName --jq '.[].tagName' | grep "^${TODAY}\." || echo "") | |
| if [ -z "$EXISTING" ]; then | |
| # No releases today, start with .0 | |
| BUILD_NUM=0 | |
| else | |
| # Find highest build number for today | |
| BUILD_NUM=$(echo "$EXISTING" | sed "s/^${TODAY}\.//" | sort -n | tail -1) | |
| BUILD_NUM=$((BUILD_NUM + 1)) | |
| fi | |
| echo "Existing releases for ${TODAY}: $EXISTING" | |
| echo "Next build number: $BUILD_NUM" | |
| VERSION_NAME="${TODAY}.${BUILD_NUM}" | |
| VERSION_CODE="${TODAY_CODE}${BUILD_NUM}" | |
| echo "Generated version name: $VERSION_NAME" | |
| echo "Generated version code: $VERSION_CODE" | |
| # Set environment variables for subsequent steps | |
| echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV | |
| echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Prerelease | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ env.VERSION_NAME }} | |
| name: Alpha ${{ env.VERSION_NAME }} | |
| prerelease: true | |
| generate_release_notes: true | |
| files: artifacts/**/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |