-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (59 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
61
name: Github Releases
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install dependencies
run: yarn install
# - name: Test
# run: npm test
# env:
# CI: true
- name: Generate build
run: yarn run build
# Share artifact inside workflow
- name: Share artifact inside workflow
uses: actions/upload-artifact@v2
with:
name: react-github-actions-build
path: dist/
release:
runs-on: ubuntu-latest
# We specify that deploys needs to
# finish before we create a release
needs: build
steps:
# Download previously shared build
- name: Get artifact
uses: actions/download-artifact@v2
with:
name: react-github-actions-build
# Zip the build using external action
- name: Zip build
uses: thedoctor0/zip-release@master
with:
filename: release
run: zip -r release.zip . -i react-github-actions-build
# Upload as an artifact of the current workflow
- name: Upload build zip artifact
uses: actions/upload-artifact@v1
with:
name: release
path: release.zip
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: release.zip
token: ${{ secrets.TOKEN }}
# Make official GitHub release which will trigger
# sending the mail with link for accesss