feat: add release

This commit is contained in:
Samuel N Cui
2023-09-26 16:11:49 +08:00
parent 0619bcf69c
commit b7a8c74d17
12 changed files with 62 additions and 37 deletions
+25 -4
View File
@@ -4,9 +4,16 @@ name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
tags:
- 'v*.*.*'
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
permissions:
contents: write
pull-requests: read
jobs:
@@ -14,7 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v4
with:
@@ -27,3 +37,14 @@ jobs:
- name: Build
run: ./build.sh
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
title: "Automatic Build"
files: |
LICENSE
README.md
tapemanager-linux-amd64-${{ env.RELEASE_VERSION }}.tar.gz