Repository navigation
65 lines (55 loc) · 1.88 KB
/
Copy pathwordpress-release.yaml
File metadata and controls
65 lines (55 loc) · 1.88 KB
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
55
56
57
58
59
60
61
62
63
64
65
name: WordPress release
# A merge to main that changes the plugin publishes it to WordPress.org SVN, then records the GitHub release and
# announces it on Discord once WordPress.org serves it. Safe to re-run: an unchanged plugin publishes nothing, and a
# version already released on GitHub is not announced twice. Release steps: wordpress/README.md
on:
push:
branches:
- main
paths:
- wordpress/svn/**
workflow_dispatch:
concurrency:
group: wordpress-release
cancel-in-progress: false
jobs:
publish:
name: Publish to WordPress.org SVN
runs-on: ubuntu-latest
# SVN_USERNAME and SVN_PASSWORD live in this environment, deployable from main only: whoever holds them ships
# code to every site that auto-updates the plugin.
environment: wordpress-org
permissions:
contents: read
outputs:
version: ${{ steps.publish.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install Subversion
run: sudo apt-get update -qq && sudo apt-get install -y -qq subversion
- name: Publish
id: publish
run: scripts/publish-wordpress-svn.sh
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
announce:
name: Record the release on GitHub and announce it on Discord
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: "24"
- name: Announce the release
run: node scripts/announce-wordpress-release.mjs
env:
WAIT_FOR_LIVE_MINUTES: "45"
DISCORD_RELEASES_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASES_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}