-
Notifications
You must be signed in to change notification settings - Fork 53
62 lines (54 loc) · 2.26 KB
/
deploy-to-dotorg.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
55
56
57
58
59
60
61
62
name: Deploy to WordPress.org
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
type: choice
options:
- major
- minor
- patch
jobs:
tag:
name: Checkout repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install node dependencies
run: npm install
- name: Compile Javascript App
run: npm run build
- name: Update version and changelog
id: update-version
env:
RELEASE_TYPE: ${{ github.event.inputs.release_type }}
run: npm run update-version
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email [email protected]
git config --global --add --bool push.autoSetupRemote true
git diff-index --quiet HEAD -- || ( git add package.json package-lock.json readme.txt create-block-theme.php && git commit -m "Version bump & changelog update" --no-verify && git push )
gh release create ${{steps.update-version.outputs.NEW_TAG }} --generate-notes
- name: Create Block Theme Plugin Deploy to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
VERSION: ${{ steps.update-version.outputs.NEW_VERSION }}
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}