chore: rename ci files and fix release step

This commit is contained in:
Enrico Stahn 2020-03-11 11:36:41 +11:00
parent 505fe34b2c
commit e867455275
No known key found for this signature in database
GPG key ID: 5263621C269A50DE
2 changed files with 29 additions and 27 deletions

28
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Go
on: [release]
jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
key: ${{ secrets.YOUR_PRIVATE_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -75,7 +75,7 @@ jobs:
tag:
name: Tag
runs-on: ubuntu-latest
needs: [lint, test]
needs: [lint, test, image-scan]
if: github.ref == 'refs/heads/master'
steps:
@ -95,29 +95,3 @@ jobs:
run: $(yarn global bin)/semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
runs-on: ubuntu-latest
needs: [lint, test]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
key: ${{ secrets.YOUR_PRIVATE_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}