Release #103
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
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: Branch/tag/hash to release from (defaults to master) | |
required: false | |
default: master | |
product: | |
description: Product for which the plugin will be released (jira/confluence/bitbucket) | |
required: true | |
release-version: | |
description: Version to release (defaults to next micro version) | |
required: false | |
next-development-version: | |
description: Next development version (default to next snapshot micro version) | |
required: false | |
jobs: | |
release-plugin: | |
name: Release Plugin | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
steps: | |
# don't log password as part of the a whole inputs object | |
- name: Log job parameters | |
run: | | |
echo "Actor: [$GITHUB_ACTOR]" | |
echo 'Ref [${{ github.event.inputs.ref }}].' | |
echo 'Product [${{ github.event.inputs.product }}].' | |
echo 'Release version [${{ github.event.inputs.release-version }}].' | |
echo 'Next development version [${{ github.event.inputs.next-development-version }}].' | |
- name: Check out the code from selected branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- name: Configure git for operations performed during the release | |
run: | | |
# needed for release plugin to be able to push tags and commits | |
git config user.name $GITHUB_ACTOR | |
git config user.email "[email protected]" | |
# check the config is correct | |
cat .git/config | |
# fail job fast in case of invalid product | |
- name: Populate plugin module by selected product | |
run: bin/build/populate-plugin-by-product.sh ${{ github.event.inputs.product }} | |
- name: Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: temurin | |
- name: Log Maven settings.xml | |
run: cat $HOME/.m2/settings.xml | |
- name: Install Atlassian Plugin SDK | |
run: bin/build/install-plugin-sdk.sh | |
- run: bin/build/override-plugin-sdk-maven.sh | |
- name: Unpack cached Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: maven-release | |
restore-keys: | | |
maven-unit | |
maven- | |
- name: Install common modules to local Maven repository | |
run: bin/build/install-common-modules.sh | |
- name: Trigger the release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_VERSION: ${{ github.event.inputs.release-version }} | |
DEVELOPMENT_VERSION: ${{ github.event.inputs.next-development-version }} | |
run: bin/build/release-single-plugin.sh |