Files
jenhomeforms/.gitea/workflows/release.yaml
josh 770a08d5e9
All checks were successful
Test and publish WordPress plugin / release (push) Successful in 19s
Use compatible Gitea API client for release publication
2026-10-28 13:27:19 -04:00

44 lines
1.3 KiB
YAML

name: Test and publish WordPress plugin
on:
push:
branches: [main]
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
container:
image: php:8.4-cli-bookworm
permissions:
contents: write
env:
SOURCE_COMMIT: ${{ gitea.sha }}
steps:
- name: Install build tools
run: |
apt-get update -qq
apt-get install -y --no-install-recommends git python3 python3-requests libzip-dev
docker-php-ext-install zip
- name: Check out the triggering commit
run: |
git init .
git remote add origin https://git.labs.casa/josh/jenhomeforms.git
git fetch --depth=1 origin "$SOURCE_COMMIT"
git checkout --detach FETCH_HEAD
- name: Validate PHP and behavior
run: |
php -l jenhome-contact-exports.php
php -l crm-display.php
php -l gitea-updater.php
php tests/unit.php
- name: Build release package
run: python3 scripts/build-release.py
- name: Publish stable tag
if: startsWith(gitea.ref, 'refs/tags/v')
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
RELEASE_TAG: ${{ gitea.ref_name }}
run: |
python3 scripts/build-release.py "$RELEASE_TAG"
python3 scripts/publish-release.py