Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@ on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Existing tag to build and upload assets for (e.g. v0.1.0)'
required: true
type: string

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
env:
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.RELEASE_TAG }}

- name: Set up Rust 1.80
uses: dtolnay/rust-toolchain@master
Expand All @@ -23,6 +35,9 @@ jobs:
- name: Install musl-tools
run: sudo apt-get update && sudo apt-get install -y musl-tools

- name: Ensure musl target installed
run: rustup target add x86_64-unknown-linux-musl

- name: Cache cargo build
uses: actions/cache@v4
with:
Expand All @@ -40,7 +55,7 @@ jobs:

- name: Get version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
run: echo "VERSION=${{ env.RELEASE_TAG }}" >> "$GITHUB_OUTPUT"

- name: Prepare release artifact
run: |
Expand All @@ -51,6 +66,7 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.VERSION }}
files: |
release/pbkfs-${{ steps.version.outputs.VERSION }}-linux-x86_64
release/checksums.txt
Expand Down