-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.53 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
shell: bash
run: ./build_install.sh
- name: Bundle Package
shell: bash
run: ./bundle.sh
- 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 PTC Resources Server
if: steps.wporg_release.outcome == 'success' && ${{ contains(github.ref_name, '-rc') }} != true
env:
remote: "github@${{ secrets.PTC_PROD_HOSTNAME }}"
destination: "${{ secrets.PTC_RESOURCES_SERVER_PATH }}/${{ env.PTC_PLUGIN_ZIP_FILE_BASENAME }}.zip"
run: |
echo "${{ secrets.PTC_GITHUB_SSH_KEY }}" > deploy_key
chmod 600 ./deploy_key
scp -i "./deploy_key" -o "StrictHostKeyChecking=no" "${{ env.PTC_PLUGIN_ZIP_FILE }}" "${{ env.remote }}:${{ env.destination }}"
ssh -i "./deploy_key" -o "StrictHostKeyChecking=no" "${{ env.remote }}" 'chmod 775 "${{ env.destination }}"; chgrp www-data "${{ env.destination }}"' || true