Files
wp-fix-plugin-does-not-exis…/.github/workflows/release.yml
Marcus Quinn 113c4d54da
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Prepare for WordPress.org plugin repository submission
2025-04-10 00:54:56 +01:00

68 lines
2.0 KiB
YAML

name: Build Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build and Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create build directory
run: mkdir -p build/plugin-reference-cleaner
- name: Copy plugin files
run: |
cp plugin-reference-cleaner.php build/plugin-reference-cleaner/
cp readme.txt build/plugin-reference-cleaner/
cp LICENSE build/plugin-reference-cleaner/
cp README.md build/plugin-reference-cleaner/
- name: Create ZIP file
run: |
cd build
zip -r ../plugin-reference-cleaner-${{ steps.get_version.outputs.VERSION }}.zip plugin-reference-cleaner
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: Release v${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
files: |
plugin-reference-cleaner-${{ steps.get_version.outputs.VERSION }}.zip
body: |
Plugin Reference Cleaner v${{ steps.get_version.outputs.VERSION }}
See [CHANGELOG.md](https://github.com/wpallstars/plugin-reference-cleaner/blob/main/CHANGELOG.md) for details.
# Deploy to WordPress.org
wordpress:
name: Deploy to WordPress.org
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: plugin-reference-cleaner