-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (53 loc) · 1.74 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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