chore(release): 0.1.0 #11
Workflow file for this run
This file contains hidden or 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: Release Starters | |
on: | |
push: | |
tags: | |
- "v*.*.*" # Trigger on any tag push | |
- "!v*.*.*-*" # Exclude pre-release tags (e.g., v1.2.3-alpha) | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version name (optional, used for filenames)" | |
required: false | |
default: "" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get tag or input version | |
id: vars | |
run: | | |
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.version }}" ]; then | |
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
else | |
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
fi | |
- name: Package each starter folder | |
run: | | |
mkdir -p output | |
for dir in ./starters/*/ ; do | |
folder_name=$(basename "$dir") | |
tar -czvf output/${folder_name}-${{ steps.vars.outputs.version }}.tar.gz -C "$dir" . | |
zip -r output/${folder_name}-${{ steps.vars.outputs.version }}.zip "$dir" | |
done | |
- name: Upload all packaged starters to GitHub Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: output/* | |
tag_name: ${{ steps.vars.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |