Skip to content

add version

add version #136

Workflow file for this run

name: Build
on: [push]
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Test
uses: gomicro/forge-action@main
with:
step: test
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [linting, test]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRAIN_CLIENT_ID: ${{ secrets.OAUTH_CLIENT_ID }}
TRAIN_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Snapshot
uses: goreleaser/goreleaser-action@v2
with:
args: release --snapshot
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v2
with:
args: release --rm-dist