-
Notifications
You must be signed in to change notification settings - Fork 82
42 lines (38 loc) · 1.15 KB
/
deploy.yml
File metadata and controls
42 lines (38 loc) · 1.15 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
name: Deploy to WordPress.org
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
dry-run:
description: 'Run as dry-run (no changes will be pushed)'
required: false
type: boolean
default: true
jobs:
deploy:
name: WordPress Plugin Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Resolve version
id: version
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
else
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
fi
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run == true }}
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: wp-scss
VERSION: ${{ steps.version.outputs.version }}