mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- "v00.*"
|
|
workflow_dispatch:
|
|
concurrency:
|
|
group: ${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
name: Release
|
|
jobs:
|
|
build:
|
|
name: Build ${{ matrix.arch }}-${{ matrix.target-suffix }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
arch: [x86_64, aarch64]
|
|
include:
|
|
- os: ubuntu-latest
|
|
target-suffix: unknown-linux-gnu
|
|
- os: macos-latest
|
|
target-suffix: apple-darwin
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install cross
|
|
shell: bash
|
|
run: |
|
|
cargo install cross --git https://github.com/cross-rs/cross
|
|
- name: Install Libs for linux
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt update -y
|
|
sudo apt install -y libdbus-1-dev libssl-dev gnome-keyring libxcb1-dev
|
|
gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar'
|
|
- id: build
|
|
shell: bash
|
|
run: |
|
|
export CROSS_NO_WARNINGS=0
|
|
export TARGET=${{ matrix.arch }}-${{ matrix.target-suffix }}
|
|
rustup target add "${TARGET}"
|
|
cross build --release --target ${TARGET}
|
|
export TARGET_PATH=target/${TARGET}/release/goose-${TARGET}
|
|
mv target/${TARGET}/release/goose ${TARGET_PATH}
|
|
bzip2 -f9 ${TARGET_PATH}
|
|
echo "TARGET_PATH=${TARGET_PATH}.bz2" >> $GITHUB_OUTPUT
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: goose-${{ matrix.arch }}-${{ matrix.target-suffix }}
|
|
path: ${{ steps.build.outputs.TARGET_PATH }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
merge-multiple: true
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: "goose-*.bz2" |