fix CI + create dependencies between workflows #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
permissions: | ||
contents: write # needed to write releases | ||
id-token: write # needed for keyless signing | ||
jobs: | ||
lint: | ||
uses: ./lint.yaml | ||
test: | ||
uses: ./test.yaml | ||
release: | ||
strategy: | ||
matrix: | ||
go-version: [1.19.x] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Install GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
install-only: true | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Run Mage | ||
uses: magefile/mage-action@v2 | ||
with: | ||
version: latest | ||
args: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |