fork/glide
git clone https://git.julia.blue/fork/glide
91014dd
main
1name : Package 2 3on : 4push : 5tags : 6- "v*.*.*" 7branches : 8- main 9 10env : 11CARGO_INCREMENTAL : 0 12CARGO_NET_RETRY : 10 13CARGO_TERM_COLOR : always 14RUST_BACKTRACE : 1 15RUSTUP_MAX_RETRIES : 10 16 17jobs : 18package : 19environment : packaging 20runs-on : macos-15 21permissions : 22contents : write 23 24steps : 25- name : Install cargo-packager 26uses : taiki-e/cache-cargo-install-action@v2 27with : 28tool : cargo-packager@0.11.8 29 30- name : Install parse-changelog 31uses : taiki-e/cache-cargo-install-action@v2 32with : 33tool : parse-changelog@0.6.14 34 35- uses : actions/checkout@v4 36with : 37persist-credentials : false 38 39# release-please normally parses the pull request description for release notes. 40# Instead of having two sources of truth, get them from the changelog. 41# 42# The workflow still isn't perfect because release-please can overwrite 43# the PR if new changes land, but it's good enough for now. 44- name : Parse changelog 45if : github.ref_type == 'tag' 46run : | 47GLIDE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "glide-wm") | .version') 48parse-changelog CHANGELOG.md $GLIDE_VERSION > CHANGELOG_version.md 49 50- name : Install latest stable 51run : | 52rustup update stable 53rustup target add aarch64-apple-darwin 54rustup target add x86_64-apple-darwin 55 56- name : Build 57run : | 58cargo build --release --verbose --locked --target aarch64-apple-darwin 59cargo build --release --verbose --locked --target x86_64-apple-darwin 60 61- name : Import code-signing certificates 62uses : apple-actions/import-codesign-certs@v3 63with : 64p12-file-base64 : ${{ secrets.BUILD_CERTIFICATE_BASE64 }} 65p12-password : ${{ secrets.P12_PASSWORD }} 66 67- name : Import notarization API key 68if : github.ref_type == 'tag' 69env : 70APPLE_API_KEY_BASE64 : ${{ secrets.APPLE_API_KEY_BASE64 }} 71run : | 72echo "$APPLE_API_KEY_BASE64" | base64 --decode > AuthKey.p8 73 74- name : Package, sign, and notarize 75env : 76APPLE_API_KEY : ${{ secrets.APPLE_API_KEY }} 77APPLE_API_ISSUER : ${{ secrets.APPLE_API_ISSUER }} 78APPLE_API_KEY_PATH : AuthKey.p8 79run : | 80if [[ "${{ github.ref_type }}" != "tag" ]]; then 81# Disable notarization. 82unset APPLE_API_KEY 83unset APPLE_API_ISSUER 84fi 85# For debugging; should show the signing identity 86security find-identity -v -p codesigning 87 88# HACK: Add --deep flag so codesign doesn't complain about signing 89# binaries in the wrong order (only on x86_64, wtf) 90mkdir -p ~/.bin 91cat <<'END' >~/.bin/codesign 92#!/bin/bash 93exec /usr/bin/codesign "$@" --deep 94END 95chmod +x ~/.bin/codesign 96export PATH=~/.bin:"$PATH" 97 98# Package, sign, and notarize 99cargo packager --release --target aarch64-apple-darwin 100cargo packager --release --target x86_64-apple-darwin 101 102- uses : actions/upload-artifact@v4 103with : 104path : target/*-apple-darwin/release/Glide_*.dmg 105 106- name : Release 107uses : softprops/action-gh-release@v2 108if : github.ref_type == 'tag' 109with : 110files : | 111target/aarch64-apple-darwin/release/Glide_*.dmg 112target/x86_64-apple-darwin/release/Glide_*.dmg 113fail_on_unmatched_files : true 114body_path : CHANGELOG_version.md 115# To keep release-please's notes, comment the line above and uncomment 116# these lines: 117# body: "" 118# append_body: true