Add Gitea CI/CD workflows for automated releases
All checks were successful
Create Release / build (push) Successful in 2s

Add automated release creation and versioning workflows similar to the fourthwall plugin.

Features:
- Automatically creates a release on every push to main branch
- Generates release notes from commit messages since last tag
- Updates plugin version using timestamp-based versioning (YYYY.MM.DD-HHMM)
- Creates and uploads plugin zip file to release
- Supports manual release creation/editing to update version

Workflows:
- .gitea/workflows/release.yml - Triggers on push to main
- .gitea/workflows/update-version.yml - Triggers on release creation/edit

The release zip will be automatically picked up by the Gitea auto-updater for WordPress.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-01 16:13:42 -08:00
parent 86dd477d4f
commit 384ad5e265
2 changed files with 139 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
name: Update Plugin Version
on:
release:
types: [created, edited]
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get release tag
id: get_tag
run: echo "TAG=${GITEA_REF#refs/tags/}" >> $GITEA_ENV
- name: Update version in plugin file
run: |
# Replace version in main plugin file
sed -i "s/Version: .*/Version: ${{ env.TAG }}/" twilio-wp-plugin.php
# Verify change
grep "Version:" twilio-wp-plugin.php
- name: Commit changes
run: |
git config --local user.email "action@gitea.com"
git config --local user.name "Gitea Action"
git add twilio-wp-plugin.php
git commit -m "Update version to ${{ env.TAG }}" || echo "No changes to commit"
git push || echo "Nothing to push"
- name: Create plugin zip
run: |
mkdir -p /tmp/twilio-wp-plugin
rsync -av --exclude=".git" --exclude=".gitea" --exclude="build" . /tmp/twilio-wp-plugin/
cd /tmp
zip -r $GITEA_WORK_DIR/twilio-wp-plugin.zip twilio-wp-plugin
- name: Upload zip to release
uses: actions/upload-release-asset@v1
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
upload_url: ${{ gitea.event.release.upload_url }}
asset_path: twilio-wp-plugin.zip
asset_name: twilio-wp-plugin.zip
asset_content_type: application/zip