-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (53 loc) · 1.72 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check if secrets exist
env:
svn_username: ${{ secrets.SVN_USERNAME }}
svn_password: ${{ secrets.SVN_PASSWORD }}
if: ${{ (env.svn_username == '') || (env.svn_password == '') }}
run: exit 1
- name: Install npm packages
run: |
npm i
- name: Semantic release
id: semantic
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
branches: |
['master']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set env
if: steps.semantic.outputs.new_release_published == 'true'
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build release
if: steps.semantic.outputs.new_release_published == 'true'
shell: bash
run: |
npm run plugin-zip
- name: Release
if: steps.semantic.outputs.new_release_published == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.semantic.outputs.new_release_version }}
files: |
dist/light-modal-block.zip
- name: WordPress Plugin Deploy
id: deploy
if: steps.semantic.outputs.new_release_published == 'true'
uses: 10up/[email protected]
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: light-modal-block
VERSION: ${{ steps.semantic.outputs.new_release_version }}
BUILD_DIR: dist/light-modal-block