Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Create Release

on:
workflow_dispatch:
inputs:
version:
description: "Release version (e.g. v1.2.3)"
required: true

permissions:
contents: write

jobs:
create_release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Enforce user permissions
run: |
ALLOWED_USERS=("piratekev" "gsgalloway")
if [[ ! " ${ALLOWED_USERS[@]} " =~ " ${GITHUB_ACTOR} " ]]; then
echo "❌ User $GITHUB_ACTOR is not allowed to run this workflow."
exit 1
fi

- name: Create Git tag
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git tag v${{ github.event.inputs.version }}
git push origin v${{ github.event.inputs.version }}

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.version }}
name: Release ${{ github.event.inputs.version }}
generate_release_notes: true