Skip to content

Merge pull request #122 from smuppand/main #1

Merge pull request #122 from smuppand/main

Merge pull request #122 from smuppand/main #1

Workflow file for this run

name: Zstd Archive Release
on:
push:
tags:
- 'v*.*.*' # match v1.2.3, v10.20.30, etc.
workflow_dispatch: # allow manual runs
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install zstd
run: sudo apt-get update && sudo apt-get install -y zstd
- name: Extract version info
id: version
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}" # e.g. v1.2.3
SHORT_TAG="${TAG_NAME#v}" # strip leading "v" → 1.2.3
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
echo "short_tag=$SHORT_TAG" >> $GITHUB_OUTPUT
- name: Create .tar.zst archives using git archive
run: |
git archive --format=tar --prefix=test-definitions/ ${{ steps.version.outputs.tag_name }} \
| zstd -o ../${{ steps.version.outputs.tag_name }}.tar.zst
git archive --format=tar --prefix=test-definitions/ ${{ steps.version.outputs.tag_name }} \
| zstd -o ../${{ steps.version.outputs.short_tag }}.tar.zst
- name: Upload .tar.zst archives to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag_name }}
name: Release ${{ steps.version.outputs.tag_name }}
files: |
../${{ steps.version.outputs.tag_name }}.tar.zst
../${{ steps.version.outputs.short_tag }}.tar.zst
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}