Skip to content

Release a new version of a provider model #48

Release a new version of a provider model

Release a new version of a provider model #48

name: Release a new version of a provider model
on:
workflow_dispatch:
inputs:
releaseversion:
type: string
description: 'Version to release'
required: true
provider:
type: choice
description: 'Provider to release'
required: true
options:
- provider-upjet-azure
- provider-upjet-azuread
- provider-upjet-aws
- provider-upjet-gcp
- provider-upjet-github
- provider-terraform
- provider-kubernetes
family:
type: boolean
description: 'If true, we download into groups of crds and release both as family and as groups. False just allInOne.'
required: true
default: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'oracle'
cache: maven
server-id: central
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Fetch and build crds
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MAVEN_OPTS: "-Xmx2048m"
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}"
run : ./fetchAndBuild.sh "${{ github.event.inputs.releaseversion }}" "${{ github.event.inputs.family }}"
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: "${{ github.event.inputs.releaseversion }}"
provider: "${{ github.event.inputs.provider }}"
run: |
gh release create "$provider-$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="$provider-v${tag#v}" \
--target "$GITHUB_SHA"