From 20a4d91ad0576cbb97755d012b0199c7fabd5cd0 Mon Sep 17 00:00:00 2001 From: Anthony Correa Date: Tue, 17 Feb 2026 14:53:52 -0600 Subject: [PATCH] add github actions --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 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 0000000..8aee003 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release Plugin Zip + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build plugin zip + id: build + run: | + set -euo pipefail + PLUGIN_SLUG="${GITHUB_REPOSITORY##*/}" + TAG="${GITHUB_REF_NAME}" + ZIP_NAME="${PLUGIN_SLUG}-${TAG}.zip" + + mkdir -p dist + git archive --format=zip --prefix="${PLUGIN_SLUG}/" -o "dist/${ZIP_NAME}" HEAD + + echo "zip_path=dist/${ZIP_NAME}" >> "$GITHUB_OUTPUT" + echo "zip_name=${ZIP_NAME}" >> "$GITHUB_OUTPUT" + + - name: Create or update release and upload zip + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + name: ${{ github.ref_name }} + generateReleaseNotes: true + allowUpdates: true + replacesArtifacts: true + artifacts: ${{ steps.build.outputs.zip_path }}