From 949a86d7dc9972c060328985da6b61b5768bed84 Mon Sep 17 00:00:00 2001 From: faangbait <101474875+faangbait@users.noreply.github.com> Date: Thu, 11 Jun 2026 19:35:59 -0500 Subject: [PATCH] Add GitHub Actions workflow for release process --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..03e93733 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Release + +on: + push: + branches: [ main, release ] + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Check out tagged revision + uses: actions/checkout@v6 + + - name: Package + run: | + set -euo pipefail + + OUTPUT="$GITHUB_SHA:.gitignore_global" + OUTPUT_PATH="$GITHUB_WORKSPACE/$OUTPUT" + + > "$OUTPUT_PATH" + + while IFS= read -r -d '' file; do + echo "# === $file ===" >> "$OUTPUT_PATH" + cat "$file" >> "$OUTPUT_PATH" + echo >> "$OUTPUT_PATH" + done < <(find "$GITHUB_WORKSPACE" -name "*.gitignore" ! -path "$OUTPUT_PATH" -print0 | sort -z) + + - name: Create GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: >- + gh release create "$GITHUB_REF_NAME" "$GITHUB_WORKSPACE/$GITHUB_SHA:.gitignore_global" + --repo "$GITHUB_REPOSITORY" + --title "$GITHUB_REF_NAME" + --generate-notes + --verify-tag