ci: add release workflow for main
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
name: Build and Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libgtk-4-dev librsvg2-dev
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --release
|
||||||
|
|
||||||
|
- name: Generate short SHA
|
||||||
|
id: vars
|
||||||
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: release-${{ steps.vars.outputs.sha_short }}
|
||||||
|
name: Build ${{ steps.vars.outputs.sha_short }}
|
||||||
|
files: target/release/icon-color-tool
|
||||||
|
body: |
|
||||||
|
Automated build from commit ${{ github.sha }}.
|
||||||
|
|
||||||
|
**Note**: This is a dynamically linked binary. It requires GTK4 and librsvg to be installed on the host system to run.
|
||||||
Reference in New Issue
Block a user