Skip to content

ref_name:main release_version:v0.8.0-alpha.6 #319

ref_name:main release_version:v0.8.0-alpha.6

ref_name:main release_version:v0.8.0-alpha.6 #319

name: RELEASE-VERSION
on:
workflow_dispatch:
inputs:
release_version:
description: 'The version of release'
required: true
default: ''
run-name: ref_name:${{ github.ref_name }} release_version:${{ inputs.release_version }}
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GO_VERSION: "1.21"
jobs:
release-message:
uses: apecloud/apecloud-cd/.github/workflows/[email protected]
with:
TYPE: "1"
VERSION: "${{ inputs.release_version }}"
APECD_REF: "v0.1.38"
secrets: inherit
trigger-mode:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.get_trigger_mode.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: release message
id: get_trigger_mode
run: |
TEST_PACKAGES=`bash .github/utils/utils.sh --type 16 \
--trigger-type "[test]" \
--test-pkgs "${{ vars.TEST_PKGS }}" \
--test-check "${{ vars.TEST_CHECK }}" \
--test-pkgs-first "${{ vars.TEST_PKGS_FIRST }}" \
--ignore-pkgs "${{ vars.SKIP_CHECK_PKG }}"`
echo "matrix={\"include\":[$TEST_PACKAGES]}" >> $GITHUB_OUTPUT
release-test:
needs: [ trigger-mode ]
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix: ${{ fromJSON(needs.trigger-mode.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: install lib
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libbtrfs-dev \
libdevmapper-dev
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "${{ env.GO_VERSION }}"
- name: Install golangci-lint
if: matrix.ops == 'lint'
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2
- name: make ${{ matrix.ops }}
if: ${{ ! contains(matrix.ops, '/') }}
run: |
make ${{ matrix.ops }}
- name: make test ${{ matrix.ops }}
if: ${{ contains(matrix.ops, '/') }}
run: |
if [[ -d "./${{ matrix.ops }}" ]]; then
make test TEST_PACKAGES=./${{ matrix.ops }}/...
fi
release-branch:
needs: release-test
uses: apecloud/apecloud-cd/.github/workflows/[email protected]
with:
RELEASE_VERSION: "${{ inputs.release_version }}"
RELEASE_BRANCH: "${{ github.ref_name }}"
APECD_REF: "v0.1.38"
secrets: inherit
release-addons-version:
needs: release-branch
uses: apecloud/apecloud-cd/.github/workflows/[email protected]
with:
GITHUB_REPO: "apecloud/kubeblocks-addons"
VERSION: "${{ inputs.release_version }}"
BRANCH_NAME: "${{ needs.release-branch.outputs.release-branch }}"
WORKFLOW_ID: "release-version.yml"
APECD_REF: "v0.1.38"
secrets: inherit
release-kbcli-version:
needs: release-branch
uses: apecloud/apecloud-cd/.github/workflows/[email protected]
with:
GITHUB_REPO: "apecloud/kbcli"
VERSION: "${{ inputs.release_version }}"
BRANCH_NAME: "${{ needs.release-branch.outputs.release-branch }}"
WORKFLOW_ID: "release-version.yml"
APECD_REF: "v0.1.38"
secrets: inherit
release-version:
needs: [ release-addons-version, release-kbcli-version ]
runs-on: ubuntu-latest
steps:
- name: checkout branch ${{ github.ref_name }}
uses: actions/checkout@v4
- name: push tag
uses: mathieudutour/[email protected]
with:
custom_tag: ${{ inputs.release_version }}
github_token: ${{ env.GITHUB_TOKEN }}
tag_prefix: ""
send-message:
needs: [ release-version, release-addons-version, release-kbcli-version ]
if: ${{ failure() || cancelled() }}
uses: apecloud/apecloud-cd/.github/workflows/[email protected]
with:
TYPE: "2"
CONTENT: "release ${{ inputs.release_version }} error"
APECD_REF: "v0.1.38"
secrets: inherit