-
Notifications
You must be signed in to change notification settings - Fork 120
48 lines (46 loc) · 1.29 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
name: Build artifacts & Release
on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
inputs:
tag_name:
description: "Tag name for release"
required: false
default: nightly
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+*
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "stable"
- name: Build
run: sh ./release.sh
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
name: Release Nightly
uses: softprops/action-gh-release@v1
with:
files: release/ink*
prerelease: true
tag_name: nightly
name: Nightly build
generate_release_notes: true
fail_on_unmatched_files: true
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
name: Release
uses: softprops/action-gh-release@v1
with:
files: release/ink*
prerelease: false
name: Release ${{ github.ref }}
generate_release_notes: true
fail_on_unmatched_files: true