Skip to content

Commit df78e21

Browse files
authored
* github action to perform Release (#825)
- manually triggered - changes version to Release one - builds everything - deploys to sonatype for staging - changes version to next development - uploads idea and eclipse plugins - creates draft release on github
1 parent f182fc8 commit df78e21

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

.github/workflows/release.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Build and release version
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tagName:
6+
required: true
7+
description: 'TAG name for release'
8+
targetBranch:
9+
description: 'Branch to build'
10+
required: true
11+
releaseVersion:
12+
description: 'Release version'
13+
required: true
14+
nextDevVersion:
15+
description: 'Next development version'
16+
required: true
17+
releaseMessage:
18+
required: true
19+
description: 'Release message'
20+
jobs:
21+
build:
22+
runs-on: macos-15
23+
env:
24+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
25+
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
26+
MAVEN_ARGS: -Dmaven.resolver.transport=wagon
27+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
28+
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
29+
NEXT_DEVELOPMENT_VERSION: ${{ github.event.inputs.nextDevVersion }}
30+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
31+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
32+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
with:
37+
ref: ${{ github.event.inputs.targetBranch }}
38+
- name: Set up JDK 17
39+
uses: actions/setup-java@v1
40+
with:
41+
java-version: '17'
42+
server-id: sonatype-nexus-snapshots
43+
server-username: MAVEN_USERNAME
44+
server-password: MAVEN_PASSWORD
45+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
46+
gpg-passphrase: GPG_PASSPHRASE
47+
48+
- name: Install dependencies
49+
run: |
50+
brew install openssl
51+
brew install autoconf
52+
brew install automake
53+
brew install libtool
54+
55+
- name: change version to release (and commit)
56+
run: |
57+
DEVELOPMENT_VERSION=$RELEASE_VERSION setversion.sh
58+
git -am "Set release version, $RELEASE_VERSION"
59+
60+
- name: build natives
61+
run: ./build.sh
62+
63+
- name: Maven deploy (staging)
64+
run: mvn -Probovm-release clean deploy
65+
66+
- name: Gradle plugin deploy (staging)
67+
run: cd plugins/gradle && ./gradlew clean build publish && ./gradlew jreleaserDeploy
68+
69+
- name: change version to next dev (and commit)
70+
run: |
71+
DEVELOPMENT_VERSION=NEXT_DEVELOPMENT_VERSION setversion.sh
72+
git commit -am "Set next development version, $NEXT_DEVELOPMENT_VERSION"
73+
74+
- name: Configure AWS Credentials
75+
uses: aws-actions/configure-aws-credentials@v1
76+
with:
77+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
78+
aws-secret-access-key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
79+
aws-region: eu-west-3
80+
81+
- name: Deploy idea plugin
82+
run: aws s3 sync ./plugins/idea/build/distributions/ s3://${{ secrets.AWS_BUCKET }}/tmp_snapshots/idea --acl public-read --follow-symlinks --delete
83+
84+
- name: Deploy eclipse plugin
85+
run: aws s3 sync ./plugins/eclipse/update-site/target/repository/ s3://${{ secrets.AWS_BUCKET }}/tmp_snapshots/eclipse --acl public-read --follow-symlinks --delete
86+
87+
- name: Create a draft release
88+
uses: ncipollo/release-action@v1
89+
with:
90+
name: "${{ github.event.inputs.tagName }}"
91+
body: "${{ github.event.inputs.releaseMessage }}"
92+
tag: "${{ github.event.inputs.tagName }}"
93+
draft: true
94+
artifacts: "plugins/idea/build/distributions/*"
95+
token: ${{ secrets.GITHUB_TOKEN }}
96+
97+
- name: Pushes changes as last step
98+
run: git push

0 commit comments

Comments
 (0)