xjasonlyu
3 years ago
3 changed files with 71 additions and 40 deletions
@ -0,0 +1,53 @@ |
|||
name: Publish Go Releases |
|||
|
|||
on: |
|||
push: |
|||
branches: |
|||
- 'main' |
|||
tags: |
|||
- '*' |
|||
paths-ignore: |
|||
- '**.md' |
|||
- 'docs/**' |
|||
- 'docker/**' |
|||
|
|||
jobs: |
|||
build: |
|||
name: Build |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Check out code into the Go module directory |
|||
uses: actions/checkout@v2 |
|||
with: |
|||
fetch-depth: 0 |
|||
|
|||
- name: Setup Go |
|||
uses: actions/setup-go@v2 |
|||
with: |
|||
go-version: 1.16.x |
|||
|
|||
- name: Build |
|||
run: make -j releases |
|||
|
|||
- name: Upload Releases (nightly) |
|||
uses: softprops/action-gh-release@v1 |
|||
if: github.ref == 'refs/heads/main' |
|||
env: |
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|||
with: |
|||
files: build/* |
|||
draft: false |
|||
prerelease: true |
|||
name: Nightly Build |
|||
tag_name: nightly |
|||
body: Automatically Released by Actions. |
|||
|
|||
- name: Upload Releases |
|||
uses: softprops/action-gh-release@v1 |
|||
if: startsWith(github.ref, 'refs/tags/') |
|||
env: |
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|||
with: |
|||
files: build/* |
|||
draft: true |
|||
prerelease: false |
Loading…
Reference in new issue