-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19076dc
commit fe0037a
Showing
1 changed file
with
15 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,23 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
name: Auto Release | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the "master" branch | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
branches: [ master ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # for release-drafter/release-drafter to create a github release | ||
pull-requests: write # for release-drafter/release-drafter to add label to PR | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# - name: Release Drafter | ||
# You may pin to the exact commit or the version. | ||
# uses: release-drafter/release-drafter@e9ee02fbac03d922bac6212003695e8358dd88b0 | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GTOKEN }} | ||
|
||
|
||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- name: Build | ||
run: go build -v ./... | ||
- name: Create new version | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git tag -a v${{ github.run_number }} -m "Auto release version ${{ github.run_number }}" | ||
git push origin v${{ github.run_number }} |