Skip to content

Add zstd archive to tagged releases #1

Add zstd archive to tagged releases

Add zstd archive to tagged releases #1

Workflow file for this run

name: Zstd Archive Release
on:
push:
tags:
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/}"
SHORT_TAG=$(echo "$TAG_NAME" | cut -d '.' -f 1,2)
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
echo "short_tag=$SHORT_TAG" >> $GITHUB_OUTPUT
- name: Create zstd archive without prefix
run: |
cd ..
tar --exclude='./qcom-linux-testkit/.git' -I zstd -cf ${{ steps.version.outputs.tag_name }}.tar.zst qcom-linux-testkit
cp ${{ steps.version.outputs.tag_name }}.tar.zst ${{ steps.version.outputs.short_tag }}.tar.zst
- name: Upload archive(s) 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 }}