-
Notifications
You must be signed in to change notification settings - Fork 61
99 lines (83 loc) · 2.63 KB
/
build.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build
on:
pull_request:
push:
branches:
- develop
- master
tags:
- v*
jobs:
build:
name: Build extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Build extension via docker image
run: yarn build:docker
- name: Archive extension build zip file
uses: actions/upload-artifact@v2
with:
name: extension
path: ./dist-docker/joule-*.zip
- name: Archive sha256sum manifest file
uses: actions/upload-artifact@v2
with:
name: manifest
path: ./dist-docker/manifest.txt
release:
name: Make release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
steps:
- name: Create release
id: create_release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: true
body: |
## Release Notes
<!-- Release notes here -->
## Verify Release
<!-- Make sure you upload gpg signature before releasing! -->
See https://github.com/joule-labs/joule-extension/tree/develop/docs/verify.md
- name: Download extension build zip artifact
uses: actions/download-artifact@v2
with:
name: extension
- name: Display structure of downloaded files
run: ls -R
- name: Upload extension build to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./joule-${{ github.ref_name }}.zip
asset_name: joule-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: Download sha256sum manifest artifact
uses: actions/download-artifact@v2
with:
name: manifest
- name: Display structure of downloaded files
run: ls -R
- name: Upload sha256sum manifest to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./manifest.txt
asset_name: manifest-${{ github.ref_name }}.txt
asset_content_type: text/plain