build(deps): bump actions/upload-artifact from 4.5.0 to 4.6.0 #394
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "master" ] | |
tags: ["[0-9]+.[0-9]+.[0-9]+"] | |
paths-ignore: | |
- "LICENSE-MIT" | |
- "LICENSE-APACHE" | |
- "README.md" | |
- "SECURITY.MD" | |
- ".gitignore" | |
- "docs/**" | |
- "install.sh" | |
- "aft-relay.service" | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- build: Linux x86-64 | |
os: ubuntu-20.04 | |
target: x86_64-unknown-linux-gnu | |
archive_name: aft-linux-x86_64.gz | |
- build: Windows x86-64 | |
os: windows-latest | |
target: x86_64-pc-windows-gnu | |
archive_name: aft-windows-gnu-x86_64.zip | |
- build: Windows x86-64 MSVC | |
os: windows-latest | |
target: x86_64-pc-windows-msvc | |
archive_name: aft-windows-msvc-x86_64.zip | |
- build: macOS x86-64 | |
os: macos-latest | |
target: x86_64-apple-darwin | |
archive_name: aft-macos-x86_64.gz | |
- build: macOS AArch64/ARM | |
os: macos-latest | |
target: aarch64-apple-darwin | |
archive_name: aft-macos-aarch64.gz | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal | |
- name: Add target | |
run: rustup target add ${{ matrix.target }} | |
- name: Build release | |
run: | | |
cargo update | |
cargo build --features full --release --verbose --target ${{ matrix.target }} | |
- name: Compress Windows | |
if: matrix.os == 'windows-latest' | |
shell: pwsh | |
run: Get-ChildItem -Path ./target -Recurse -Filter 'aft.exe' | Compress-Archive -DestinationPath ./${{ matrix.archive_name }} | |
- name: Compress Linux/macOS | |
if: matrix.os != 'windows-latest' | |
run: gzip -cN target/**/release/aft > ${{ matrix.archive_name }} | |
- uses: actions/upload-artifact@v4.6.0 | |
with: | |
name: ${{ matrix.archive_name }} | |
path: ./${{ matrix.archive_name }} | |
publish-release: | |
runs-on: ubuntu-latest | |
needs: [build] | |
permissions: | |
contents: write | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ~/archives/ | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
id: create_release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
TAG=$(git describe --tags --abbrev=0) | |
gh release create $TAG --draft --notes "# What's new since the latest release" --generate-notes --title "v$TAG" ~/archives/**/* |