Skip to content

chore: add github action to release binaries on tags #2

chore: add github action to release binaries on tags

chore: add github action to release binaries on tags #2

Workflow file for this run

name: release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
dev:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.0"
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish dev image
id: docker_dev_build
uses: docker/build-push-action@v2
with:
push: true
file: "./Dockerfile.dev"
tags: missingstudio/gateway:dev
releaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.0"
- name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: goreleaser release --clean
env:
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}