forked from woocommerce/woocommerce-blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.61 KB
/
nightly-builds.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
name: Nightly builds
on:
schedule:
- cron: '0 0 * * *' # Run at 12 AM UTC.
workflow_dispatch:
env:
NODE_OPTIONS: --max-old-space-size=4096 # development build takes a lot of memory
jobs:
build:
name: Nightly builds
strategy:
fail-fast: false
matrix:
build: [trunk]
runs-on: ubuntu-20.04
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ matrix.build }}
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install Node Dependencies
run: npm ci --no-optional
- name: Build zip
run: bash bin/build-plugin-zip.sh -d
- name: Deploy nightly build
uses: WebFreak001/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# 80943895 is the release ID of this nightly release https://github.com/woocommerce/woocommerce-blocks/releases/tag/nightly
upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/80943895/assets{?name,label}
release_id: 80943895
asset_path: woocommerce-gutenberg-products-block.zip
asset_name: woocommerce-blocks-${{ matrix.build }}-nightly.zip
asset_content_type: application/zip
max_releases: 1
update:
name: Update nightly tag commit ref
runs-on: ubuntu-20.04
steps:
- name: Update nightly tag
uses: richardsimko/[email protected]
with:
tag_name: nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}