Skip to content

Bump Swatinem/rust-cache from 2.7.3 to 2.7.5 (#159) #430

Bump Swatinem/rust-cache from 2.7.3 to 2.7.5 (#159)

Bump Swatinem/rust-cache from 2.7.3 to 2.7.5 (#159) #430

Workflow file for this run

name: release
on:
push:
branches: [main, staging, trying]
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
pull_request:
branches: [main]
# branches-ignore:
# - 'dependabot/**'
workflow_dispatch:
jobs:
release:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set artifact name
shell: bash
run: |
version="$(git describe --tags --match='v*.*.*' --always)"
name="bulko-$version-${{ matrix.target }}"
echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV
echo "version: $version"
echo "artifact: $name"
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Init cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab
- name: Setup Mold
uses: rui314/setup-mold@v1
with:
mold-version: 2.32.0
make-default: false
- name: Build binary
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
- name: Check formatting
run: |
cargo build --release --target=${{ matrix.target }} --color=always --verbose
- name: Package (*nix)
if: runner.os != 'Windows'
run: >
tar -cv
LICENSE.md README.md
-C target/${{ matrix.target }}/release/ buklo
| gzip --best > '${{ env.ARTIFACT_NAME }}.tar.gz'
- name: Package (Windows)
if: runner.os == 'Windows'
run: >
7z a ${{ env.ARTIFACT_NAME }}.zip
LICENSE.md README.md
./target/${{ matrix.target }}/release/buklo.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: |
*.zip
*.tar.gz
- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
draft: false
generate_release_notes: true
discussion_category_name: 'release'
files: |
*.zip
*.tar.gz