-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 2.3 KB
/
deploy-free.yml
File metadata and controls
68 lines (56 loc) · 2.3 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
66
67
68
name: Deploy free plugin to WordPress.org
permissions:
contents: write
on:
workflow_call:
secrets:
SVN_USERNAME:
required: true
SVN_PASSWORD:
required: true
env:
DEV_SCRIPTS_DIR: ${{ github.workspace }}/vendor/publishpress/dev-workspace/scripts
jobs:
deploy-wp-org:
name: Deploy the tagged release to WordPress.org
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
# actions/checkout@v6.0.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up PHP
# shivammathur/setup-php@2.37.0
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f
with:
php-version: 8.3
extensions: mbstring,xml,curl,zip,intl,bcmath,gettext,mysqli,phar,gd,iconv,yaml
tools: composer:v2
- name: Create root .env file
run: cp $GITHUB_WORKSPACE/.env.example $GITHUB_WORKSPACE/.env
- name: Validate Composer configuration
run: composer validate --strict
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: Show dev-workspace tool versions
run: composer info:version
- name: Add dev-workspace scripts to PATH
run: echo "$DEV_SCRIPTS_DIR" >> "$GITHUB_PATH"
- name: Build plugin package
run: composer build
- name: Read plugin metadata and version
id: get-metadata
run: composer deploy:metadata-github-output
- name: Upload GitHub release asset
# softprops/action-gh-release@v3.0.0
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
with:
files: ${{ github.workspace }}/dist/${{ steps.get-metadata.outputs.plugin-name }}-${{ steps.get-metadata.outputs.plugin-version }}.zip
- name: Deploy plugin to WordPress.org
# 10up/action-wordpress-plugin-deploy@v2.3.0
uses: 10up/action-wordpress-plugin-deploy@54bd289b8525fd23a5c365ec369185f2966529c2
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: ${{ steps.get-metadata.outputs.plugin-folder }}
BUILD_DIR: ${{ github.workspace }}/dist/${{ steps.get-metadata.outputs.plugin-folder }}