-
Notifications
You must be signed in to change notification settings - Fork 5
81 lines (69 loc) · 1.96 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
on:
push
name: Make Release
jobs:
build:
name: Build Node
runs-on: ubuntu-latest
container:
image: node:12.16.3-buster
steps:
- name: Install git
run: |
apt install git
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch complete git history and tags
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
git describe
- name: Compile sources
run: |
export "BUILD=yes"
export "GIT_VERSION=${GITHUB_REF:-$GITHUB_SHA}"
export "GIT_COMMITHASH=${GITHUB_SHA}"
export "GIT_BRANCH=${GITHUB_REF:-$GITHUB_SHA}"
cd design/ui
yarn install
yarn build
- name: Upload Artefacts
uses: actions/upload-artifact@v1
with:
name: html-root
path: ./apps/core/static/
release:
name: Create Release
runs-on: ubuntu-latest
needs: ['build']
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: html-root
path: html-root
- name: Compress artefact
run: |
tar czf html-root.tar.gz html-root
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ""
draft: false
prerelease: false
- name: Upload artefact to release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: html-root.tar.gz
asset_name: html-root.tar.gz
asset_content_type: application/tar+gzip