44 lines
968 B
YAML
44 lines
968 B
YAML
name: Publish
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- Build
|
|
types:
|
|
- completed
|
|
branch:
|
|
- master
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
name: Publish
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install
|
|
run: curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sudo bash -s -- -b $GOPATH/bin v0.5.1
|
|
|
|
- name: Login
|
|
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
|
|
|
|
- name: Build latest
|
|
if: "!startsWith(github.ref, 'refs/tags/')"
|
|
run: make publish-latest
|
|
|
|
- name: Build release
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: make publish-release
|
|
|
|
- name: GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|