Skip to content

changelog

changelog #17

Workflow file for this run

name: Publish Release
on:
push:
tags:
- "v*"
jobs:
tag:
name: Publish Release
runs-on: ubuntu-latest
environment:
name: production
url: https://purpleturtlecreative.com/completionist/plugin-info/
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build - Install
run: ./build_install.sh
shell: bash
- name: Bundle Package
run: ./bundle.sh
shell: bash
- name: Upload ZIP File
uses: actions/upload-artifact@v4
with:
name: ${{ env.PTC_PLUGIN_ZIP_FILE_BASENAME }}
path: ${{ env.PTC_PLUGIN_ZIP_FILE }}
- name: Publish WordPress Plugin Release
id: wporg_release
uses: 10up/action-wordpress-plugin-deploy@stable
with:
dry-run: ${{ contains(github.ref_name, '-rc.') }}
generate-zip: false
env:
SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }}
- name: Upload to Server
if: steps.wporg_release.outcome == 'success' && ${{ contains(github.ref_name, '-rc.') }} != true
env:
remote: "github@${{ secrets.PTC_PROD_HOSTNAME }}"
destination: "/var/www/html/wp-content/plugins/ptc-resources-server/resources/plugins/completionist/${{ env.PTC_PLUGIN_ZIP_FILE_BASENAME }}.zip"
run: |
echo "${{ secrets.PTC_GITHUB_SSH_KEY }}" > deploy_key
chmod 600 ./deploy_key
ssh-keyscan ${{ secrets.PTC_PROD_HOSTNAME }} >> ~/.ssh/known_hosts
scp -i ./deploy_key ${{ env.PTC_PLUGIN_ZIP_FILE }} ${{ env.remote }}:${{ env.destination }}
ssh -i ./deploy_key ${{ env.remote }} 'chmod 775 ${{ env.destination }}; chgrp www-data ${{ env.destination }}' || true