mcad Release #14
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
# This workflow will Build image and push to mcad quay repository and create a GitHub release tag | |
name: mcad Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Release tag' | |
required: true | |
default: 'v0.0.0-dev' | |
type: string | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: check tag format | |
run: | | |
if [[ "${{ github.event.inputs.tag }}" =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]; then | |
echo "Tag format is valid." | |
else | |
echo "Invalid tag format: ${{ github.event.inputs.tag }}" | |
exit 1 | |
fi | |
- name: Create github release tag | |
run: | | |
if git rev-parse -q --verify "refs/tags/${{ github.event.inputs.tag }}"; then | |
echo "Tag ${{ github.event.inputs.tag }} already exist. Exiting workflow." | |
exit 1 | |
else | |
gh release create ${{ github.event.inputs.tag }} --title "MCAD ${{ github.event.inputs.tag }} Release" --generate-notes --target ${{ github.ref }} | |
fi | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Publish MCAD package | |
run: | | |
GOPROXY=proxy.golang.org go list -m github.com/project-codeflare/multi-cluster-app-dispatcher@${{ github.event.inputs.tag }} | |