forked from GeyserMC/Configurate
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 979 Bytes
/
Copy pathpublish.yml
File metadata and controls
35 lines (29 loc) · 979 Bytes
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
name: Publish
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v7
with:
submodules: recursive
- uses: actions/setup-java@v5
with:
java-version: 17
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-read-only: ${{ github.ref_name != 'master' && github.ref_name != 'development' }}
- name: Build
run: ./gradlew build
- name: Publish to Maven Repository
if: ${{ github.repository == 'DevBlook/Configurate' }}
run: ./gradlew publishMavenPublicationToGithubPackagesRepository
env:
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }}
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}