Release: v2024.11.18 #5604
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: | |
issue_comment: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v1 | |
with: | |
go-version: '1.23' | |
id: go | |
- name: Install yq | |
run: | | |
curl -fsSL -o yqq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 | |
chmod +x yqq | |
sudo mv yqq /usr/local/bin/yqq | |
pipx install yq | |
- name: Install release automaton | |
run: | | |
curl -fsSL -o release-automaton https://github.com/appscodelabs/release-automaton/releases/latest/download/release-automaton-linux-amd64 | |
chmod +x release-automaton | |
sudo mv release-automaton /usr/local/bin/release-automaton | |
- name: Install Hugo Tools | |
run: | | |
curl -fsSL -o hugo-tools https://github.com/appscodelabs/hugo-tools/releases/latest/download/hugo-tools-linux-amd64 | |
chmod +x hugo-tools | |
sudo mv hugo-tools /usr/local/bin/hugo-tools | |
- name: Install render-gotpl | |
run: | | |
curl -fsSL -o render-gotpl https://github.com/appscodelabs/render-gotpl/releases/latest/download/render-gotpl-linux-amd64 | |
chmod +x render-gotpl | |
sudo mv render-gotpl /usr/local/bin/render-gotpl | |
- name: Install crd-importer | |
run: | | |
curl -L -o crd-importer https://github.com/kmodules/crd-importer/releases/latest/download/crd-importer-linux-amd64 | |
chmod +x ./crd-importer | |
sudo mv ./crd-importer /usr/local/bin/crd-importer | |
- name: Install image packer | |
run: | | |
cd /tmp | |
curl -fsSL -O https://github.com/kmodules/image-packer/releases/latest/download/image-packer-linux-amd64.tar.gz | |
tar -xvf image-packer-linux-amd64.tar.gz | |
chmod +x image-packer-linux-amd64 | |
sudo mv image-packer-linux-amd64 /usr/local/bin/image-packer | |
- name: Install Helm 3 | |
run: | | |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | |
- name: Install GitHub CLI | |
run: | | |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 | |
sudo mv bin/hub /usr/local/bin | |
- name: Prepare git | |
env: | |
GITHUB_USER: 1gtm | |
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | |
run: | | |
set -x | |
git config --global user.name "1gtm" | |
git config --global user.email "[email protected]" | |
git config --global \ | |
url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com".insteadOf \ | |
"https://github.com" | |
# git remote set-url origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
- name: Prepare Go for private repos | |
run: | | |
go env -w GOPRIVATE=go.appscode.dev/*,github.com/appscode/*,kubedb.dev/* | |
- name: Release | |
if: startsWith(github.event.issue.title, 'Release:') && contains(github.event.issue.html_url, '/pull/') && contains(github.event.issue.labels, 'locked') == false | |
env: | |
GITHUB_USER: 1gtm | |
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | |
RELEASE_TRACKER: ${{ github.event.issue.html_url }} | |
PR_TITLE: ${{ github.event.issue.title }} | |
run: | | |
title="${{ github.event.issue.title }}" | |
while IFS=$': \r\t' read -r marker v ignored; do | |
case $marker in | |
Release) | |
export RELEASE=$(echo $v | tr -d '\r\t') | |
;; | |
esac | |
done <<< "$title" | |
[ ! -z "$RELEASE" ] || { | |
echo "Release number not found in issue title." | |
exit 0 | |
} | |
hub pr checkout ${{ github.event.issue.number }} | |
release-automaton release run \ | |
--release-tracker=${{ github.event.issue.html_url }} \ | |
--release-file=./releases/${RELEASE}/release.json \ | |
--comment-id=${{ github.event.comment.id }} | |
release-automaton release readme | |
git add --all | |
git commit -a -s -m "Update release table" || true | |
git push origin HEAD || true |