Skip to content

Merge pull request #32 from gabm/fix-release #2

Merge pull request #32 from gabm/fix-release

Merge pull request #32 from gabm/fix-release #2

Workflow file for this run

name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
CARGO_TERM_COLOR: always
jobs:
release:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
archive: tar.gz
runs-on: ${{ matrix.os }}
container:
image: ghcr.io/gtk-rs/gtk4-rs/gtk4:latest
permissions:
contents: write
steps:
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: yum install -y gtk4-devel libadwaita-devel
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Pack Artifacts
if: matrix.os == 'ubuntu-latest'
env:
RELEASE_NAME: satty-${{ matrix.target }}
ARTIFACTS_DIR: target/${{ matrix.target }}/release
run: |
mkdir $RELEASE_NAME
cp target/${{ matrix.target }}/release/satty -t $RELEASE_NAME
cp -r completions -t $RELEASE_NAME
cp -r README.md assets LICENSE satty.desktop -t $RELEASE_NAME
tar -zcvf $RELEASE_NAME.${{ matrix.archive }} -C $RELEASE_NAME .
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: satty-${{ matrix.target }}.${{ matrix.archive }}