chore(release): cleanup repository and bump version to 0.1.13 #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Get version from tag | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Create plugin directory with correct name | |
| run: mkdir -p postgrid | |
| - name: Copy plugin files | |
| run: | | |
| # Copy essential files | |
| cp postgrid.php postgrid/ | |
| cp readme.txt postgrid/ | |
| cp block.json postgrid/ | |
| # Copy license if it exists | |
| if [ -f license.txt ]; then | |
| cp license.txt postgrid/ | |
| fi | |
| # Copy directories if they exist | |
| if [ -d includes ]; then | |
| cp -r includes postgrid/ | |
| fi | |
| if [ -d src ]; then | |
| cp -r src postgrid/ | |
| fi | |
| if [ -d build ]; then | |
| cp -r build postgrid/ | |
| fi | |
| if [ -d assets ]; then | |
| cp -r assets postgrid/ | |
| fi | |
| if [ -d languages ]; then | |
| cp -r languages postgrid/ | |
| fi | |
| - name: Create ZIP file | |
| run: zip -r postgrid.zip postgrid/ | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref }} | |
| release_name: PostGrid v${{ steps.get_version.outputs.VERSION }} | |
| body: | | |
| ## PostGrid v${{ steps.get_version.outputs.VERSION }} | |
| ### Installation | |
| 1. Download `postgrid.zip` | |
| 2. Go to WordPress Admin → Plugins → Add New → Upload Plugin | |
| 3. Select the downloaded ZIP file | |
| 4. Activate the plugin | |
| ### Changelog | |
| See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details. | |
| ### Migration from Caxton | |
| PostGrid includes full backwards compatibility with Caxton. See the [Migration Guide](https://github.com/${{ github.repository }}/blob/main/CAXTON_MIGRATION_GUIDE.md) for details. | |
| draft: false | |
| prerelease: false | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./postgrid.zip | |
| asset_name: postgrid.zip | |
| asset_content_type: application/zip |