-
-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (71 loc) · 2.31 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Start GitHub Action
uses: actions/checkout@v4
- name: Init Git submodules
uses: snickerbockers/submodules-init@v4
- name: Install Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: |
npm i yarn --no-save
yarn install --frozen-lockfile
- name: Build
env:
PRERELEASE: "${{ github.event.release.prerelease }}"
CHANGELOG: ${{ github.event.release.html_url }}
run: |
if [[ $PRERELEASE == "true" ]]; then yarn run wg --env.CHANGELOG="$CHANGELOG"; else yarn run build; fi
- name: Test
run: |
yarn test
- name: Archive Release
uses: thedoctor0/[email protected]
with:
filename: "build.zip"
path: "build"
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build.zip
asset_name: build.zip
asset_content_type: application/zip
- uses: chrnorm/deployment-action@releases/v1
name: Request Production Deployment
if: "!github.event.release.prerelease"
id: deployment
with:
token: "${{ github.token }}"
target_url: https://monoweb.app
ref: "${{ github.event.release.tag_name }}"
auto_merge: "false"
inititial_status: pending
environment: production
description: "Release publication"
- uses: chrnorm/deployment-action@releases/v1
name: Request Pre-Release Deployment
if: "github.event.release.prerelease"
id: pre-release-deployment
with:
token: "${{ github.token }}"
target_url: https://beta.monoweb.app
ref: "${{ github.event.release.tag_name }}"
auto_merge: "false"
inititial_status: pending
environment: wg
description: "Pre-Release publication"