-
Notifications
You must be signed in to change notification settings - Fork 25
72 lines (71 loc) · 2.74 KB
/
release.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
62
63
64
65
66
67
68
69
70
71
72
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: 17
distribution: adopt
- 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