ci: add SVN release step

This commit is contained in:
Ben Goldsworthy 2021-06-19 09:56:16 +01:00
parent 54bedd651c
commit 17b54556fb

View file

@ -1,13 +1,17 @@
name: Pre-release Handler # This workflow handles GitHub releases and pre-releases.
# It builds the Plugin, adds an archive artifact to the
# release entry on GitHub and (in the case of a full release)
# pushes the release to the WP Plugin Directory SVN repo.
name: Release Handler
on: on:
release: release:
types: [published] types: [published]
jobs: jobs:
build: build_plugin:
name: Build the Plugin for pre-release name: Build the Plugin for pre-release
if: "github.event.release.prerelease"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -26,6 +30,12 @@ jobs:
run: | run: |
mv dist/ footnotes/ mv dist/ footnotes/
create_archive:
name: Create an archive for the release and add it to GitHub
runs-on: ubuntu-latest
needs: build_plugin
steps:
- name: Create release archive - name: Create release archive
uses: montudor/action-zip@v0.1.0 uses: montudor/action-zip@v0.1.0
with: with:
@ -44,10 +54,18 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#- name: Deploy release to Wordpress.org release_to_svn:
# uses: 10up/action-wordpress-plugin-deploy@stable name: Push the release to the WordPress Plugin Directory repo.
# with: if: "!github.event.release.prerelease"
# generate-zip: true runs-on: ubuntu-latest
# env: needs: create_archive
# SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
# SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} steps:
- name: Deploy release to Wordpress.org
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: footnotes/branches/svn-test
ASSETS_DIR: assets