-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (52 loc) · 1.44 KB
/
release.yaml
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
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*'
name: Build and Release
jobs:
build:
name: Global Job
strategy:
matrix:
node: ['10.x']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create production build
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node }}
- run: npm install -g yarn
- run: yarn
- run: yarn build
env:
REACT_APP_NETWORK_ID: ${{ secrets.REACT_APP_NETWORK_ID }}
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Zip the build
uses: thedoctor0/zip-release@master
with:
filename: 'build.zip'
path: './build'
exclusions: 'x'
- name: Upload Build
id: build-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build.zip
asset_name: build.zip
asset_content_type: application/zip