2021-06-26 01:40:26 +00:00
|
|
|
name: goreleaser
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2021-08-04 18:47:03 +00:00
|
|
|
- 'fleet-*'
|
2021-06-26 01:40:26 +00:00
|
|
|
|
|
|
|
permissions:
|
2022-03-28 20:20:31 +00:00
|
|
|
contents: read
|
2021-06-26 01:40:26 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
goreleaser:
|
|
|
|
runs-on: ubuntu-latest
|
2021-06-26 02:58:35 +00:00
|
|
|
environment: Docker Hub
|
2022-03-28 20:20:31 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2021-06-26 01:40:26 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-08-31 10:44:22 +00:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2
|
2021-06-26 01:40:26 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # Needed for goreleaser
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
2022-06-29 01:27:48 +00:00
|
|
|
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1.10.0
|
2021-06-26 01:40:26 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
|
|
|
|
|
|
|
|
- name: Set up Go
|
2022-07-18 17:24:51 +00:00
|
|
|
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # v2
|
2021-06-26 01:40:26 +00:00
|
|
|
with:
|
2022-09-12 23:32:43 +00:00
|
|
|
go-version: 1.19.1
|
2021-06-26 01:40:26 +00:00
|
|
|
|
|
|
|
- name: Install JS Dependencies
|
|
|
|
run: make deps-js
|
|
|
|
|
|
|
|
- name: Install Go Dependencies
|
|
|
|
run: make deps-go
|
|
|
|
|
|
|
|
- name: Run GoReleaser
|
2022-05-31 16:24:23 +00:00
|
|
|
uses: goreleaser/goreleaser-action@68acf3b1adf004ac9c2f0a4259e85c5f66e99bef
|
2021-06-26 01:40:26 +00:00
|
|
|
with:
|
2021-08-12 00:13:11 +00:00
|
|
|
distribution: goreleaser-pro
|
2021-06-26 01:40:26 +00:00
|
|
|
version: latest
|
2021-08-04 18:47:03 +00:00
|
|
|
args: release --rm-dist -f .goreleaser.yml
|
2021-06-26 01:40:26 +00:00
|
|
|
env:
|
2021-08-12 00:13:11 +00:00
|
|
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
2021-06-26 01:40:26 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|