Skip to content

Commit 6107804

Browse files
committed
Add github workflow to publish release
1 parent f0f4cc3 commit 6107804

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/release.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- main
9+
10+
jobs:
11+
main:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: '0' # all branches and tags
18+
19+
# ref: https://github.com/actions/cache
20+
- name: Get cache for third party dependencies
21+
id: cache
22+
uses: actions/cache@v2
23+
with:
24+
path: third_party
25+
key: third-party-${{ hashFiles('tools/install_third_party') }}
26+
27+
- name: Build third-party dependencies
28+
if: steps.cache.outputs.cache-hit != 'true'
29+
run: tools/install_third_party
30+
31+
- name: Build package
32+
run: tools/package
33+
34+
# ref: https://github.com/actions/upload-artifact
35+
- name: Upload build artifact
36+
uses: actions/upload-artifact@v2
37+
with:
38+
name: json-bookmarks.zip
39+
path: out/json-bookmarks-*.zip
40+
41+
# ref: https://github.com/softprops/action-gh-release
42+
- name: Create release
43+
uses: softprops/action-gh-release@v1
44+
if: startsWith(github.ref, 'refs/tags/')
45+
with:
46+
files: out/json-bookmarks-*.zip
File renamed without changes.

0 commit comments

Comments
 (0)