Skip to content

release-cmd-config

release-cmd-config #5

name: release-cmd-config
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: release type (major, minor, or patch).
options:
- major
- minor
- patch
required: true
default: 'patch'
release_branch:
type: string
description: release branch name "release-cmd/config-v*"
required: true
default: 'master'
jobs:
pre-build:
name: Pre-build
runs-on: ubuntu-latest
steps:
- name: Fetch changes
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.release_branch }}
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.work
- name: Unit test
id: unit_test
run: |
echo "Executing unit test"
go install github.com/jstemmer/go-junit-report@latest
make test-unit-all | go-junit-report -set-exit-code > report.xml
build:
name: Build
runs-on: ubuntu-latest
needs: pre-build
steps:
- name: Fetch changes
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.release_branch }}
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.work
- name: Install local tools
run: |
make install-local-tools
- name: Pin kyaml
run: |
git remote add upstream git@github.com:kubernetes-sigs/kustomize.git
git remote -v
gorepomod pin kyaml --local --doIt
- name: Build test
run: |
make build-kustomize-api
release:
name: Release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Fetch changes
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.release_branch }}
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.work
- name: Install local tools
run: |
make install-local-tools
- name: Release cmd/config
run: |
gorepomod release cmd/config ${{ inputs.release_type }} --local --doIt