mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 12:05:52 +00:00
51e4317f09
The release will trigger when a new tag is pushed. Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GO111MODULE: on
|
|
steps:
|
|
- name: Checkout Source
|
|
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.x
|
|
- name : Get release version
|
|
id: get_version
|
|
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
|
|
- name: Release Binaries
|
|
uses: goreleaser/goreleaser-action@v1
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Release Docker Image
|
|
uses: elgohr/Publish-Docker-Github-Action@master
|
|
with:
|
|
name: securego/gosec
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
buildargs: GO_VERSION=1.14
|
|
tags: "latest,${{ env.RELEASE_VERSION }}"
|
|
tag_names: true
|