mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 23:25:10 +01:00
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
name: Publish to Modrinth
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
- name: Set up Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: 21
|
|
check-latest: true
|
|
# The USERNAME and PASSWORD need to correspond to the credentials environment variables used in
|
|
# the publishing section of your build.gradle
|
|
- name: Publish to GitHub Packages and other Mavens
|
|
run: ./gradlew publish
|
|
env:
|
|
BRANCH_NAME: ${{ github.ref }}
|
|
RUN_COUNT: ${{ github.run_number }}
|
|
REPO_NAME: ${{ github.repository }}
|
|
USERNAME: ${{ github.actor }}
|
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
midnightcontrols_MAVEN: ${{ secrets.MAVEN_URL }}
|
|
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
|
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
|
- name: Publish to Modrinth
|
|
env:
|
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
|
run: ./gradlew publishModrinth
|