Skip to content

RELEASE: v0.12.1 (#1364) #33

RELEASE: v0.12.1 (#1364)

RELEASE: v0.12.1 (#1364) #33

Workflow file for this run

name: Release tagging
on:
push:
branches:
- 'master'
paths:
- 'chart/k8gb/Chart.yaml'
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
cut_release:
runs-on: ubuntu-20.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@f8b229487278099721572481264761b1d4fdd530
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
with:
fetch-depth: 0
- name: Get Desired Tag
run: |
tag=$(awk '/appVersion:/ {print $2}' chart/k8gb/Chart.yaml)
echo "Version to release: ${tag}"
echo "desired_tag=${tag}" >> $GITHUB_ENV
- name: Push Tag
if: startsWith(github.event.head_commit.message, 'RELEASE:')
uses: mathieudutour/github-tag-action@fcfbdceb3093f6d85a3b194740f8c6cec632f4e2 #v6.1
with:
github_token: ${{ secrets.CR_TOKEN }}
create_annotated_tag: true
tag_prefix: ""
custom_tag: ${{ env.desired_tag }}
- name: Get Current Tag
if: startsWith(github.event.head_commit.message, 'Revert "RELEASE:')
run: |
tag=$(git describe --tags --abbrev=0)
echo "Version to revert: ${tag}"
echo "current_tag=${tag}" >> $GITHUB_ENV
- name: Get Previous Tag
if: startsWith(github.event.head_commit.message, 'Revert "RELEASE:')
run: |
tag=$(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)
echo "Previous tag: ${tag}"
echo "previous_tag=${tag}" >> $GITHUB_ENV
- name: Delete Tag and Release
if: startsWith(github.event.head_commit.message, 'Revert "RELEASE:') && env.desired_tag == env.previous_tag
uses: dev-drprasad/delete-tag-and-release@7550ea180f81ca0a875ee3c135b1f72ef66ff4b1
with:
delete_release: true # default: false
tag_name: ${{ env.current_tag }}
env:
GITHUB_TOKEN: ${{ secrets.CR_TOKEN }}