e260cb524a
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.9.1 to 4.2.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.9.1...v4.2.0) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
name: Release
|
|
on:
|
|
workflow_dispatch:
|
|
# Release patches and secruity updates on a schedule
|
|
schedule:
|
|
- cron: "0 0 1 * *"
|
|
|
|
jobs:
|
|
tag:
|
|
name: Tag
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master'
|
|
steps:
|
|
|
|
- name: Setup Node.js for use with actions
|
|
uses: actions/setup-node@v3
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- 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 }}
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
needs: [tag]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3.3.1
|
|
with:
|
|
go-version: 1.17
|
|
id: go
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2.0.0
|
|
with:
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
password: ${{ secrets.DOCKER_PASS }}
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v2.0.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v4.2.0
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|