forked from rockcrafters/java-rockcraft-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.62 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
name: Release
on:
push:
tags:
- '*'
jobs:
build:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Setup LXD
uses: canonical/setup-lxd@main
with:
channel: 5.21/candidate
- name: Build and verify project
run: |
sudo snap install rockcraft --classic
./gradlew clean build -i
- name: Publish to Gradle plugin repository
id: deploy
run: |
./gradlew publishPlugins -Pgradle.publish.key=$PUBLISH_KEY -Pgradle.publish.secret=$PUBLISH_SECRET
shell: bash
env:
PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
- name: Publish to Maven central
id: deploy-maven
run: |
mvn deploy -B -Prelease
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_TOKEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true