Add Helm chart for openshift-routes #60
Workflow file for this run
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: GoReleaser | |
on: | |
pull_request: | |
push: | |
tags: | |
- "*" | |
permissions: | |
contents: write # needed to update the data of a release | |
packages: write | |
jobs: | |
goreleaser: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fetch all tags | |
run: git fetch --force --tags | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "^1.20" | |
- uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run GoReleaser (PR) | |
uses: goreleaser/goreleaser-action@v2 | |
if: "!startsWith(github.ref, 'refs/tags')" # runs on a PR | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --snapshot | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run GoReleaser (Publish Release) | |
uses: goreleaser/goreleaser-action@v2 | |
if: "startsWith(github.ref, 'refs/tags')" # runs on a Tag being pushed | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |