2020-03-11 00:54:39 +00:00
|
|
|
name: Release
|
2022-05-20 08:48:28 +00:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
# Release patches and secruity updates on a schedule
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 1 * *"
|
|
|
|
|
2020-03-11 00:36:41 +00:00
|
|
|
jobs:
|
2020-11-20 13:24:53 +00:00
|
|
|
tag:
|
|
|
|
name: Tag
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Setup Node.js for use with actions
|
2023-11-01 14:09:56 +00:00
|
|
|
uses: actions/setup-node@v4
|
2020-11-20 13:24:53 +00:00
|
|
|
|
|
|
|
- name: Checkout
|
2022-03-30 11:03:28 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-03-30 11:27:49 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-11-20 13:24:53 +00:00
|
|
|
|
|
|
|
- name: Install semantic-release
|
|
|
|
run: yarn global add --no-progress --non-interactive "semantic-release" "@semantic-release/exec"
|
|
|
|
|
|
|
|
- name: Run semantic-release
|
|
|
|
run: $(yarn global bin)/semantic-release
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-03-11 00:36:41 +00:00
|
|
|
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
2020-03-11 00:52:29 +00:00
|
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
2020-11-20 13:24:53 +00:00
|
|
|
needs: [tag]
|
2020-03-11 00:36:41 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-30 11:03:28 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-03-30 11:27:49 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-03-11 00:36:41 +00:00
|
|
|
|
|
|
|
- name: Set up Go
|
2023-09-01 14:02:01 +00:00
|
|
|
uses: actions/setup-go@v4.1.0
|
2020-03-11 00:36:41 +00:00
|
|
|
with:
|
2022-02-08 21:56:44 +00:00
|
|
|
go-version: 1.17
|
2020-03-11 00:36:41 +00:00
|
|
|
id: go
|
|
|
|
|
2020-11-02 13:40:49 +00:00
|
|
|
- name: Login to DockerHub
|
2024-07-01 14:24:14 +00:00
|
|
|
uses: docker/login-action@v3.2.0
|
2020-11-02 13:40:49 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
|
|
password: ${{ secrets.DOCKER_PASS }}
|
2020-04-09 13:56:04 +00:00
|
|
|
|
2022-05-20 08:42:23 +00:00
|
|
|
- name: Login to GitHub Container Registry
|
2024-07-01 14:24:14 +00:00
|
|
|
uses: docker/login-action@v3.2.0
|
2022-05-20 08:42:23 +00:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2020-03-11 00:36:41 +00:00
|
|
|
- name: Run GoReleaser
|
2023-07-01 14:45:01 +00:00
|
|
|
uses: goreleaser/goreleaser-action@v4.3.0
|
2020-03-11 00:36:41 +00:00
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|