ci: add block-stable workflow

This commit is contained in:
Jonathan Miller
2026-06-18 10:55:58 -05:00
parent af2897bb57
commit c5058cf99d
+33
View File
@@ -0,0 +1,33 @@
name: Block Stable Releases (Untested)
# This workflow auto-deletes "stable" releases until we're ready.
# DELETE THIS FILE when all testing is complete and stable releases should be allowed.
on:
release:
types: [published]
jobs:
block-stable:
runs-on: ubuntu-latest
if: contains(github.event.release.tag_name, 'stable')
steps:
- name: Delete stable release (not yet tested)
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
echo "Blocking stable release: ${{ github.event.release.tag_name }}"
echo "Reason: Code has not been fully tested yet."
echo "Remove .gitea/workflows/block-stable.yaml when ready for stable releases."
# Delete the release via API
curl -s -X DELETE \
-H "Authorization: token ${GITEA_TOKEN}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${{ github.event.release.id }}"
# Also delete the tag to keep things clean
curl -s -X DELETE \
-H "Authorization: token ${GITEA_TOKEN}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/tags/${{ github.event.release.tag_name }}" || true
echo "Stable release blocked and deleted."