add tag support

This commit is contained in:
Boshi Lian 2022-04-04 02:17:29 +00:00
parent f78c86b8af
commit f29e22bf64
3 changed files with 11 additions and 1 deletions

View file

@ -10,6 +10,7 @@ on:
workflows: ["E2E"] workflows: ["E2E"]
types: [completed] types: [completed]
branches: [master] branches: [master]
tags: [ 'v*.*.*' ]
jobs: jobs:
build: build:

View file

@ -22,6 +22,8 @@ jobs:
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@v2 uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Dep - name: Dep
run: | run: |
@ -50,3 +52,9 @@ jobs:
- name: Test - name: Test
run: go test -v . run: go test -v .
working-directory: sshpiperd working-directory: sshpiperd
- name: create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create -d --generate-notes v$NBGV_SimpleVersion

View file

@ -2,6 +2,7 @@
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "0.7", "version": "0.7",
"publicReleaseRefSpec": [ "publicReleaseRefSpec": [
"^refs/heads/master$" "^refs/heads/master$",
"^refs/tags/v\\d+\\.\\d+\\.\\d+"
] ]
} }