Skip to content

release-kyaml

release-kyaml #8

Workflow file for this run

name: release-kyaml
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-kyaml-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
- name: Test Summary
uses: test-summary/action@v1
with:
paths: |
./report.xml
if: always()
build:
name: Build
needs: 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: Build test
run: |
make build-kustomize-api
e2e-test:
name: End-to-end Testing
needs: 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: Set up docker
uses: docker-practice/actions-setup-docker@master
timeout-minutes: 12
- name: Set up podman
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: podman
version: 1.0
- name: End-to-end testing
run: |
make verify-kustomize-e2e
release:
name: Release
needs: e2e-test
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: Release kyaml
working-directory: $GITHUB_WORKSPACE
run: |
make install-tools
gorepomod release kyaml ${{ inputs.release_type }}