Run GoReleaser on tag

This commit is contained in:
Mustafa Gezen 2021-06-08 20:08:09 +02:00 committed by GitHub
parent cd1fbccc74
commit 6811daad5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 17 deletions

26
.github/workflows/go.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Go
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,17 +0,0 @@
name: OCI
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
run: docker login --username mstg --password ${{secrets.DOCKER_SECRET}}
- name: Build the Docker image
run: docker build . -t docker.io/mstg/srpmproc:${GITHUB_REF#refs/tags/}
- name: Push to Docker Hub
run: docker push docker.io/mstg/srpmproc:${GITHUB_REF#refs/tags/}