-
Notifications
You must be signed in to change notification settings - Fork 37
47 lines (40 loc) · 1.17 KB
/
build-and-deploy.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
name: Build and Deploy to SVN
on:
push:
tag:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14.17.5'
- name: Install dependencies
run: npm install
- name: Build Plugin
run: npm run build
- name: Extract version number
id: get_version
run: |
version=$(grep -Po 'Version:\s*\K[\d.]+' qubely.php)
echo "VERSION_NUMBER=$version" >> $GITHUB_ENV
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
dry-run: true
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
BUILD_DIR: build/qubely
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: ${{ github.event.repository.name }}-${{ env.VERSION_NUMBER }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}