Skip to content

Fix/endpoint (#112) #28

Fix/endpoint (#112)

Fix/endpoint (#112) #28

Workflow file for this run

name: CD
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
name: Publish Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Check code format
run: make gofmt_check
- name: Run tests
run: make test
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: success()
- name: Get the new version
id: new_version
run: echo ::set-output name=VERSION::$(git tag --list "v*" --sort=version:refname | tail -n 1)
- name: Get the old version
id: old_version
run: echo ::set-output name=VERSION::$(git tag --list "v*" --sort=version:refname | tail -n 2 | head -n 1)
- name: Check version
run: |
/usr/bin/bash ./scripts/git-versioning.sh ${{ steps.new_version.outputs.VERSION }} ${{ steps.old_version.outputs.VERSION }}