-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (50 loc) · 1.99 KB
/
release.yml
File metadata and controls
52 lines (50 loc) · 1.99 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
name: Publish to Maven Central
on:
release:
types: [released]
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
if: github
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Build with Gradle
# This just publishes to the local file system; jreleaser is responsible for uploading to maven central
run: ./gradlew publish
- name: Upload to Maven Central
env:
# Needs to have access to the io.github.ArchipelagoMW namespace in maven central
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.mavenCentralUsername }}
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.mavenCentralToken }}
# JRELEASER_DEPLOY_MAVEN_NEXUS2_USERNAME: ${{ secrets.mavenCentralUsername }}
# JRELEASER_DEPLOY_MAVEN_NEXUS2_TOKEN: ${{ secrets.mavenCentralToken }}
# The content uploaded to maven central needs to be signed. The public keys need to be published,
# see https://central.sonatype.org/publish/requirements/gpg/#distributing-your-public-key for accepted
# locations
JRELEASER_GPG_PASSPHRASE: ${{ secrets.gpgPassphrase }}
# The content here needs to be the values of the public and secret key pair
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.gpgPublicKey }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.gpgSecretKey }}
# Overrides the configuration of 'NEVER'
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_RELEASE_DEPLOY_ACTIVE: 'RELEASE'
run: ./gradlew jreleaserDeploy
- name: Store JReleaser Logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: jreleaser
path: build/jreleaser
- name: Store Reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: reports
path: build/reports