-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (46 loc) · 1.78 KB
/
snapshot.yml
File metadata and controls
48 lines (46 loc) · 1.78 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
name: Publish to Maven Central
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 -Psnapshot=true
- name: Upload to Maven Central Snapshots
env:
# Needs to have access to the io.github.ArchipelagoMW namespace in maven central
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 }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_RELEASE_DEPLOY_ACTIVE: 'NEVER'
run: ./gradlew jreleaserDeploy
- name: Store JReleaser Logs
if: failure()
uses: actions/upload-artifact@v5
with:
name: jreleaser
path: build/jreleaser
- name: Store Reports
if: failure()
uses: actions/upload-artifact@v5
with:
name: reports
path: build/reports