Files
grim/.forgejo/workflows/macos.yaml
T

52 lines
1.8 KiB
YAML

on:
workflow_call:
inputs:
version:
required: true
type: string
jobs:
release:
runs-on: ubuntu
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- run: mkdir release
- name: Restore cargo cache
id: cache-cargo-restore
uses: actions/cache/restore@v5
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Release MacOS Universal
run: |
cargo zigbuild --release --target universal2-apple-darwin
cp target/universal2-apple-darwin/release/grim macos/Grim.app/Contents/MacOS
- name: Save cargo cache
uses: actions/cache/save@v5
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.cache-cargo-restore.outputs.cache-primary-key }}
- name: Archive Universal
working-directory: macos
run: |
zip -r grim-${{ inputs.version }}-macos.zip Grim.app
mv grim-${{ inputs.version }}-macos.zip ../release
- name: Checksum Release Universal
working-directory: release
run: sha256sum grim-${{ inputs.version }}-macos.zip > grim-${{ inputs.version }}-macos-sha256sum.txt
- name: Upload artifacts
run: |
tar -czf macos.tar.gz release
curl -v -u ${{ secrets.MAVEN_USER }}:${{ secrets.MAVEN_PASSWORD }} --upload-file macos.tar.gz ${{ secrets.MAVEN_HOST }}/repository/grim-ci-artifacts/${{ forgejo.repository }}/macos.tar.gz