Repository navigation
67 lines (62 loc) · 2.59 KB
/
Copy pathrelease.yaml
File metadata and controls
67 lines (62 loc) · 2.59 KB
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
62
63
64
65
66
67
# This workflow kicks off the release job of aiSSEMBLE Inference
# and deploys artifacts to Maven Central, ghcr.io and pypi
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Release aissemble-inference
on:
workflow_dispatch:
inputs:
releaseBranch:
description: "Release Branch (default: release-{releaseVersion})"
required: false
type: string
releaseVersion:
description: "Release Version (X.Y.Z)"
required: true
type: string
developmentVersion:
description: "Next Dev Version"
required: true
type: string
permissions:
contents: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Point to default release branch i.e. release-{releaseVersion} if none specified
id: branch
run: |
echo "release-branch=$( [ "${{ inputs.releaseBranch }}" != "" ] && echo "${{ inputs.releaseBranch }}" || echo "release-${{ inputs.releaseVersion }}")" >> $GITHUB_OUTPUT
- name: Print release parameters
run: |
echo "Releasing with the following parameters"
echo "Release Branch: ${{ steps.branch.outputs.release-branch }}"
echo "Release version: ${{ inputs.releaseVersion }}"
echo "Next Development version: ${{ inputs.developmentVersion }}"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
- uses: actions/checkout@v4
with:
ref: ${{ steps.branch.outputs.release-branch }}
- name: Install dependencies
uses: ./.github/actions/install_dependencies
with:
sonatype-central-user: ${{ secrets.SONATYPE_CENTRAL_REPO_TOKEN_USER }}
sonatype-central-key: ${{ secrets.SONATYPE_CENTRAL_REPO_TOKEN_KEY }}
package-index: pypi
pypi-username: ${{ secrets.PYPI_USERNAME }}
pypi-token: ${{ secrets.PYPI_TOKEN }}
- name: Release aissemble-inference
run: |
git config --local user.email "aissemble@bah.com"
git config --local user.name "Github Actions"
mvn -B release:clean release:prepare release:perform -Pci,release -DreleaseVersion=${{ inputs.releaseVersion }} -DdevelopmentVersion=${{ inputs.developmentVersion }} -Dmaven.build.cache.enabled=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}