-
Notifications
You must be signed in to change notification settings - Fork 135
57 lines (46 loc) · 1.67 KB
/
deploy.yml
File metadata and controls
57 lines (46 loc) · 1.67 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
name: Deploy to WordPress.org
on:
release:
types: [released]
workflow_dispatch:
# Workflow-level permissions set to none; jobs declare their own minimal permissions
permissions: {}
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: Deploy to WordPress.org
runs-on: ubuntu-latest
permissions:
contents: write # Required to upload release assets to the GitHub release
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: '20'
# Disabled to prevent cache poisoning in release workflows
package-manager-cache: false
- name: Install dependencies
run: npm ci
- name: Build assets
run: npm run build
- name: Deploy to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@54bd289b8525fd23a5c365ec369185f2966529c2 # v2.3.0
with:
generate-zip: true
env:
SLUG: edit-flow
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
- name: Upload release asset
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
files: ${{ github.workspace }}/${{ github.event.repository.name }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}