-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.57 KB
/
publish-release.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
54
name: Publish release to plugin directory
run-name: Publish ${{ inputs.version }} to plugin directory
on:
# Trigger manually from https://github.com/Automattic/chatrix/actions/workflows/publish-release.yml
workflow_dispatch:
inputs:
version:
description: "Version of the release to publish, e.g. 1.2.3"
required: true
type: string
workflow_call:
inputs:
version:
description: "Version of the release to publish, e.g. 1.2.3"
required: true
type: string
secrets:
SVN_USERNAME:
required: true
SVN_PASSWORD:
required: true
jobs:
publish-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- name: Build release
# We don't use the release artifacts here, but the script will also create the release directory, and that's
# what will be uploaded to SVN.
run: ./bin/create-release-artifacts.sh ${{ inputs.version }}
- name: Install Subversion
run: sudo apt-get install subversion -y
- name: Deploy to plugin directory
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: false
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
BUILD_DIR: release/${{ inputs.version }}
ASSETS_DIR: .wporg
VERSION: ${{ inputs.version }}