mirror of
https://github.com/kristoferssolo/tls-pq-bench.git
synced 2026-03-21 16:26:22 +00:00
ci: fix release workflow with absolute paths ci: simplify release workflow ci: fix release workflow with GITHUB_TOKEN
70 lines
1.9 KiB
YAML
70 lines
1.9 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+*"
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: "Release tag (e.g., v1.0.0)"
|
|
required: true
|
|
type: string
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo build --release --locked
|
|
- name: Strip server binary
|
|
run: strip target/release/server
|
|
- name: Strip runner binary
|
|
run: strip target/release/runner
|
|
- uses: actions/upload-artifact@v6
|
|
with:
|
|
name: server
|
|
path: target/release/server
|
|
- uses: actions/upload-artifact@v6
|
|
with:
|
|
name: runner
|
|
path: target/release/runner
|
|
release:
|
|
name: Create Release
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/download-artifact@v6
|
|
with:
|
|
path: artifacts
|
|
merge-multiple: true
|
|
- name: Debug artifacts
|
|
run: |
|
|
echo "=== Contents of artifacts/ ==="
|
|
ls -la artifacts/
|
|
echo "=== Recursive listing ==="
|
|
find artifacts/ -type f
|
|
- name: Get version
|
|
id: version
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
echo "version=${{ inputs.tag }}" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
fi
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ steps.version.outputs.version }}
|
|
name: Release ${{ steps.version.outputs.version }}
|
|
files: |
|
|
artifacts/*
|
|
generate_release_notes: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|