Skip to content

Release

Release #6

Workflow file for this run

name: Release
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
tag:
description: "Tag name, e.g. 0.8.0"
default: ""
required: true
version-replace:
description: "Version to be replaced in bundle. This should match the latest version listed in community-operators-prod, such as 0.7.3."
channels:
description: "Specify the target channel, e.g. candidate,fast,stable"
required: true
jobs:
build:
name: Upload Release Asset
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Checkout code
uses: actions/checkout@v2
# - name: Login to Quay
# uses: docker/login-action@v2
# with:
# registry: quay.io/sustainable_computing_io
# username: ${{ secrets.BOT_NAME }}
# password: ${{ secrets.BOT_TOKEN }}
- name: Git set user
run: |
git config user.name "$USERNAME"
git config user.email "$USERNAME-[bot]@users.noreply.github.com"
env:
USERNAME: ${{ github.actor }}
- name: Update the VERSION
run: |
echo "$VERSION" > VERSION
env:
VERSION: ${{ github.event.inputs.tag }}
- name: Install all tools
uses: ./.github/tools-cache
- name: Build Operator
run: |
make operator-build
env:
IMG_BASE: ${{ vars.IMG_BASE }}
- name: Build Bundle
run: |
make bundle bundle-build
env:
IMG_BASE: ${{ vars.IMG_BASE }}
VERSION_REPLACED: ${{ github.event.inputs.version-replace }}
CHANNELS: ${{github.event.inputs.channels}}
- name: Commit bundle changes and tag it
run: |
git add VERSION bundle
git commit -m "ci: update VERSION to $VERSION"
git tag -a "v$VERSION" -m "$VERSION"
git show --stat
env:
VERSION: ${{ github.event.inputs.tag }}
# - name: Push Images
# run: |
# make operator-push bundle-push
# env:
# IMG_BASE: ${{ vars.IMG_BASE }}
# - name: Push Release tag
# run: |
# git push --follow-tags
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: "v${{ github.event.inputs.tag }}"
# release_name: "release-${{github.event.inputs.tag}}"
# draft: false
# prerelease: false
# create-release-branch:
# name: Create release branch
# permissions:
# contents: write
# needs: [build]
# runs-on: ubuntu-latest
# steps:
# - name: Create release branch
# uses: peterjgrainger/action-create-branch@v2.2.0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# branch: "release-${{github.event.inputs.tag}}"
# sha: "${{ github.event.pull_request.head.sha }}"