forked from trickstercache/trickster
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.59 KB
/
publish-beta-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
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+-beta[0-9]+'
name: Publish Trickster Beta Release to Drafts
jobs:
build:
name: Publish Beta Release
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
#
- name: Get bare tag
id: baretag
run: echo "::set-output name=baretag::$(echo ${{ github.ref }} | cut -b 12-)"
#
- name: Checkout code
uses: actions/checkout@v2
#
- name: install golang
uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Build project
run: |
TAGVER=${{ steps.baretag.outputs.baretag }} make release
#
- 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 v${{ steps.baretag.outputs.baretag }} / ${{ steps.date.outputs.date }}
draft: true
prerelease: true
#
- name: Upload Release Binaries Tarball
id: upload-beta-release-asset-bundle
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/trickster-${{ steps.baretag.outputs.baretag }}.tar.gz
asset_name: trickster-${{ steps.baretag.outputs.baretag }}.tar.gz
asset_content_type: application/gzip