refactor operator group cluster role name #16
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: release | |
on: | |
pull_request: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: "go.mod" | |
- name: Get the image tag | |
if: startsWith(github.ref, 'refs/tags') | |
run: | | |
# Source: https://github.saobby.my.eu.orgmunity/t/how-to-get-just-the-tag-name/16241/32 | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
echo IMAGE_TAG="${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
fi | |
# TODO dtfranz | |
# This action uses node12 and the source repo is archived; | |
# we should remove it or find a suitable replacement before it becomes a blocker. | |
- name: Create a draft release | |
uses: actions/create-release@v1 | |
id: release | |
if: startsWith(github.ref, 'refs/tags') | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
draft: true | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
if: startsWith(github.ref, 'refs/tags') | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
if: startsWith(github.ref, 'refs/tags') | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
if: startsWith(github.ref, 'refs/tags') | |
with: | |
version: 0.177.0 | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
IMAGE_REPO: quay.io/operator-framework/olm | |
PKG: github.com/operator-framework/operator-lifecycle-manager | |
- name: Generate quickstart release manifests | |
if: startsWith(github.ref, 'refs/tags') | |
run: make release ver=${{ env.IMAGE_TAG }} IMAGE_REPO=quay.io/operator-framework/olm | |
- name: Update release artifacts with rendered Kubernetes release manifests | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags') | |
with: | |
name: ${{ env.IMAGE_TAG }} | |
files: | | |
deploy/upstream/quickstart/crds.yaml | |
deploy/upstream/quickstart/olm.yaml | |
deploy/upstream/quickstart/install.sh | |
draft: true | |
token: ${{ github.token }} |