Skip to content

fix: remove obsolete profiles directory from release workflow #12

fix: remove obsolete profiles directory from release workflow

fix: remove obsolete profiles directory from release workflow #12

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
archive: tar.gz
- target: aarch64-apple-darwin
os: macos-latest
archive: tar.gz
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
archive: tar.gz
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev libvulkan-dev
- name: Cache Cargo registry and build
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.target }}
- name: Build release binary with GPU support
run: cargo build --release --target ${{ matrix.target }} -p invers-cli --features gpu
- name: Create archive (Unix)
shell: bash
run: |
mkdir -p staging
cp target/${{ matrix.target }}/release/invers staging/
cp -r config staging/
cd staging
tar czvf ../invers-${{ matrix.target }}.tar.gz .
cd ..
- name: Generate SHA256
shell: bash
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
shasum -a 256 invers-${{ matrix.target }}.tar.gz > invers-${{ matrix.target }}.tar.gz.sha256
else
sha256sum invers-${{ matrix.target }}.tar.gz > invers-${{ matrix.target }}.tar.gz.sha256
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: invers-${{ matrix.target }}
path: |
invers-${{ matrix.target }}.tar.gz
invers-${{ matrix.target }}.tar.gz.sha256
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Display structure of downloaded files
run: ls -R artifacts
- name: Prepare release files
run: |
mkdir -p release
find artifacts -type f \( -name "*.tar.gz" -o -name "*.sha256" \) -exec mv {} release/ \;
ls -la release/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: release/*
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-beta') || contains(github.ref, '-alpha') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}