File tree Expand file tree Collapse file tree 3 files changed +35
-4
lines changed
Expand file tree Collapse file tree 3 files changed +35
-4
lines changed Original file line number Diff line number Diff line change 1- # Terraform Provider release workflow.
21name : Release
32
43# This GitHub action creates a release when a tag that matches the pattern
2827 GIT_TAG : ${{ env.GIT_TAG }}
2928 GITHUB_CONTAINER_REGISTRY_TOKEN : ${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}
3029 GITHUB_USERNAME : ${{ github.actor }}
31- run : make publish
30+ run : make release
Original file line number Diff line number Diff line change @@ -5,10 +5,13 @@ DIST_FOLDER ?= ./dist
55test :
66 helm lint chart/
77
8- publish :
8+ release :
99 mkdir -p ${DIST_FOLDER}
1010 helm package chart/ --app-version ${VERSION} --destination ${DIST_FOLDER} / --version ${VERSION}
1111 helm registry login ghcr.io --username ${GITHUB_USERNAME} --password ${GITHUB_CONTAINER_REGISTRY_TOKEN}
1212 helm push ${DIST_FOLDER} /presidio-chart-${VERSION} .tgz oci://ghcr.io/hoophq/helm-charts/
1313
14- .PHONY : test publish
14+ publish :
15+ ./scripts/publish-release.sh
16+
17+ .PHONY : test release publish
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -eo pipefail
4+
5+ gh auth status
6+
7+ # pull latest tags from remote
8+ LATEST_TAG=$( gh release list -L 1 | awk {' print $1' })
9+
10+ echo " => fetching tags from remote ..."
11+ git fetch origin
12+ echo " "
13+
14+ echo " => Here are the last 10 releases from github"
15+ gh release list -L 10
16+
17+ read -rep $' \n Which version do you like to release?\n => ' GIT_TAG
18+
19+ tagRelease (){
20+ git tag $GIT_TAG
21+ git push origin $GIT_TAG
22+ }
23+
24+ read -rep $' => Do you with to create this tag / release?\n (y/n) => ' choice
25+ case " $choice " in
26+ y|Y ) tagRelease;;
27+ n|N ) echo -e " \naborting ..." ; exit 0;;
28+ * ) echo " invalid choice" ;;
29+ esac
You can’t perform that action at this time.
0 commit comments