2021-03-10 16:17:41 +00:00
|
|
|
name: Release Handler
|
2021-03-10 16:12:51 +00:00
|
|
|
|
|
|
|
# Action runs when a new release is published.
|
2021-03-10 14:56:51 +00:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
2021-03-10 16:17:41 +00:00
|
|
|
release-new:
|
|
|
|
name: Issue new release
|
2021-03-10 14:56:51 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2021-03-10 15:05:37 +00:00
|
|
|
|
2021-03-10 16:17:41 +00:00
|
|
|
- name: Build Plugin
|
2021-03-10 15:54:32 +00:00
|
|
|
run: |
|
|
|
|
composer install --no-dev --optimize-autoloader
|
|
|
|
composer run build
|
2021-03-10 16:06:57 +00:00
|
|
|
cd dist
|
2021-03-10 15:05:37 +00:00
|
|
|
|
2021-03-10 16:17:41 +00:00
|
|
|
- name: Create release archive
|
2021-03-10 16:01:03 +00:00
|
|
|
uses: montudor/action-zip@v0.1.0
|
2021-03-10 14:56:51 +00:00
|
|
|
with:
|
2021-03-10 16:12:51 +00:00
|
|
|
args: zip -X -r footnotes-${{ github.event.release.tag_name }}.zip .
|
2021-03-10 15:54:32 +00:00
|
|
|
|
2021-03-10 16:17:41 +00:00
|
|
|
- name: Upload archive as artifact
|
2021-03-10 15:54:32 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: footnotes
|
2021-03-10 16:25:32 +00:00
|
|
|
path: footnotes-${{ github.event.release.tag_name }}.zip
|
2021-03-10 15:54:32 +00:00
|
|
|
|
2021-03-10 16:17:41 +00:00
|
|
|
- name: Upload archive to release
|
2021-03-10 15:54:32 +00:00
|
|
|
uses: JasonEtco/upload-to-release@master
|
|
|
|
with:
|
2021-03-10 16:25:32 +00:00
|
|
|
args: footnotes-${{ github.event.release.tag_name }}.zip application/zip
|
2021-03-10 14:56:51 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-03-10 16:17:41 +00:00
|
|
|
|
|
|
|
#- name: Deploy release to Wordpress.org
|
|
|
|
# uses: 10up/action-wordpress-plugin-deploy@stable
|
|
|
|
# with:
|
|
|
|
# generate-zip: true
|
|
|
|
# env:
|
|
|
|
# SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
|
|
|
|
# SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
|