Release #20
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: | |
workflow_dispatch: | |
# Inputs the workflow accepts. | |
inputs: | |
tag: | |
description: "Tag name, e.g. 0.4.0" | |
default: 0.6.0 | |
required: true | |
release: | |
description: "Release name, e.g. release-0.4.0" | |
default: release-0.6.0 | |
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 VERSION and tag it | |
run: | | |
echo "$VERSION" > VERSION | |
git add VERSION | |
git commit -m 'ci: update VERSION' | |
git tag -a "v$VERSION" -m "$VERSION" | |
env: | |
VERSION: ${{ github.event.inputs.tag }} | |
- 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 }} | |
- 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: ${{ github.event.inputs.release }} | |
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/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
branch: ${{ github.event.inputs.release }} | |
sha: '${{ github.event.pull_request.head.sha }}' |