-
Notifications
You must be signed in to change notification settings - Fork 155
59 lines (47 loc) · 1.58 KB
/
release.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
name: Prepare & Deploy a Release
on:
release:
types: [published]
env:
WP_MULTISITE: 0
ACTION_VERSION: 3
jobs:
release:
name: New Release
if: github.repository == 'oidc-wp/openid-connect-generic'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Node Environment
uses: actions/setup-node@v1
# https://github.com/marketplace/actions/setup-node-js-environment
with:
node-version: 16.x
- name: Get NPM Cache Directory
id: npm-cache
if: ${{ !env.ACT }}
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Cache Node Modules
if: ${{ !env.ACT }}
uses: actions/cache@v2
env:
npm-cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.npm-cache-name }}-v${{ env.ACTION_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.npm-cache-name }}-v${{ env.ACTION_VERSION }}-
- name: NPM Install
run: npm ci
- name: Prepare a WordPress.org Release
run: npm run release
- name: WordPress.org Plugin Deploy
uses: nk-o/action-wordpress-plugin-deploy@master
# https://github.com/marketplace/actions/wordpress-plugin-deploy
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SOURCE_DIR: dist/
SLUG: daggerhart-openid-connect-generic