[skip-ci] Helm chart update for v1.14.0-rc.1 #69
Workflow file for this run
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: | |
push: | |
tags: | |
- '*' | |
env: | |
git-user: github-actions[bot] | |
git-email: 41898282+github-actions[bot]@users.noreply.github.com | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
fetch-depth: 0 | |
- name: Fetch all tags | |
run: git fetch --force --tags | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Docker Login | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GH_TOKEN }} | |
- name: Prepare GoReleaser Env | |
run: | | |
echo "IMAGE_REPOSITORY=$GITHUB_REPOSITORY_OWNER/botkube" >> $GITHUB_ENV | |
- name: Extract Previous Version | |
id: prev-version | |
run: | | |
BASE_TAG=$(echo "${{ github.ref_name }}" | awk -F- '{print $1}') | |
git fetch origin "refs/notes/*:refs/notes/*" | |
BASE_VERSION=$(echo "${BASE_TAG}" | cut -c2- | awk 'BEGIN{FS=OFS="."}NF--') | |
PREV_VERSION=$(echo $(git log --pretty=format:"%N" --show-notes="release-${BASE_VERSION}") | awk -F',' '{ print $1 }' | awk NF | awk '{ print $2 }') | |
echo "previous-version=$PREV_VERSION" >> $GITHUB_OUTPUT | |
- name: Install GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
install-only: true | |
version: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Build plugins and generate plugins index.yaml | |
env: | |
PLUGIN_DOWNLOAD_URL_BASE_PATH: "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}" | |
OUTPUT_MODE: "archive" | |
run: | | |
make gen-plugins-index | |
- name: Generate changelog | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh api repos/$GITHUB_REPOSITORY/releases/generate-notes \ | |
-f tag_name="${GITHUB_REF#refs/tags/}" \ | |
-f previous_tag_name="${{ steps.prev-version.outputs.previous-version }}" \ | |
-q .body > CHANGELOG.md | |
- name: Publish draft release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
IMAGE_TAG: ${{ github.ref_name }} | |
ANALYTICS_API_KEY: ${{ secrets.ANALYTICS_API_KEY }} | |
CLI_ANALYTICS_API_KEY: ${{ secrets.CLI_ANALYTICS_API_KEY }} | |
run: | | |
goreleaser release --clean --release-notes=CHANGELOG.md |