Skip to content

publish CI

publish CI #19

Workflow file for this run

name: publish CI
on:
workflow_dispatch:
inputs:
release_type:
type: choice
required: true
description: 'Release Type'
options:
- Full
- Patch
new_version:
description: "New Version (Without 'v' Ex: 1.0.0)"
required: true
type: string
prev_version:
description: "Previous Version (Without 'v' Ex: 1.0.0)"
required: true
type: string
env:
RELEASE_TYPE: ${{ inputs.release_type }}
NEW_VERSION: ${{ inputs.new_version }}
PREV_VERSION: ${{ inputs.prev_version }}
REPO_NAME: ${{ github.event.repository.name }}
NEXUS_USERNAME: ${{ secrets.OSSRH_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEYID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
MODULE_NAME: ${{ secrets.MODULE_NAME }}
jobs:
build:
uses: ./.github/workflows/build.yml
maven-release:
environment: Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repo and clone to CI workspace
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Copy and Decode
run: |
mkdir $PWD/.kltrenv && echo "${{ secrets.SIGNING_KEY }}" > $PWD/.kltrenv/secring.gpg.b64
base64 -d $PWD/.kltrenv/secring.gpg.b64 > $PWD/.kltrenv/secring.gpg
- name: Run publish Script
run: |
RELEASE_TYPE=${RELEASE_TYPE} NEW_VERSION=${NEW_VERSION}
PREV_VERSION=${PREV_VERSION} REPO_NAME=${REPO_NAME}
TOKEN=${{ secrets.GITHUB_TOKEN }} MODULE_NAME=${MODULE_NAME} TEAMS_WEBHOOK=${{ secrets.TEAMS_WEBHOOK }} bash .github/publish.sh
- name: Delete secring file
run: |
rm -rf $PWD/.kltrenv