-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1.06 KB
/
cut_release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: cut-release
on:
workflow_dispatch:
inputs:
commit_or_identifier:
description: "What commit or identifier to cut the release with"
required: true
tag:
description: "What to tag the release as (v{major}.{minor}.{patch}) Do not include commit hash."
required: true
jobs:
build:
name: Build chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get SHA for ref
id: sha
run: |
echo "sha_short=$(git rev-parse --short ${{ inputs.commit_or_identifier }})" >> $GITHUB_OUTPUT
echo "sha_full=$(git rev-parse ${{ inputs.commit_or_identifier }})" >> $GITHUB_OUTPUT
- name: Create tag
uses: actions/github-script@v6
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ inputs.tag }}-${{ steps.sha.outputs.sha_short }}',
sha: '${{ steps.sha.outputs.sha_full }}'
})