mirror of
https://github.com/samuelncui/yatm.git
synced 2026-09-13 11:34:24 +00:00
feat: add release
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user