This repository has been archived by the owner on Oct 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
60 lines (48 loc) · 1.65 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
60
name: Prepare & Deploy a Release
on:
release:
types: [published]
env:
ACTION_VERSION: 3
WP_MULTISITE: 0
jobs:
release:
name: New Release
if: github.repository == 'WC-Local-Pickup/woocommerce-local-pickup-time'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Node Environment
# https://github.com/marketplace/actions/setup-node-js-environment
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: ${{ !env.ACT && 'npm' || '' }}
- 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: woocommerce-local-pickup-time-select