2020-11-06 18:33:17 -05:00
|
|
|
name: Publish
|
|
|
|
on: [push]
|
2021-09-14 16:21:33 -04:00
|
|
|
concurrency: ci-${{ github.ref }}
|
2020-11-06 18:33:17 -05:00
|
|
|
jobs:
|
2021-09-20 11:51:03 -04:00
|
|
|
publish:
|
|
|
|
if: ${{ github.repository_owner == 'FabricMC' }}
|
2020-11-06 18:33:17 -05:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
container:
|
2022-02-16 11:19:57 -05:00
|
|
|
image: openjdk:18-jdk
|
2020-11-06 18:33:17 -05:00
|
|
|
options: --user root
|
|
|
|
steps:
|
2021-04-24 05:07:59 -04:00
|
|
|
- uses: actions/checkout@v2
|
2020-11-06 18:33:17 -05:00
|
|
|
- uses: gradle/wrapper-validation-action@v1
|
|
|
|
|
|
|
|
# Generate the build number based on tags to allow per branch build numbers, not something github provides by default.
|
|
|
|
- name: Generate build number
|
|
|
|
id: buildnumber
|
|
|
|
uses: einaregilsson/build-number@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.github_token }}
|
|
|
|
prefix: ${{ github.ref }}
|
|
|
|
|
2021-09-14 16:21:33 -04:00
|
|
|
- run: ./gradlew build javadocJar checkVersion publish --stacktrace
|
2020-11-06 18:33:17 -05:00
|
|
|
env:
|
|
|
|
MAVEN_URL: ${{ secrets.MAVEN_URL }}
|
|
|
|
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
|
|
|
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
2021-04-28 18:13:10 -04:00
|
|
|
BRANCH_NAME: ${{ github.ref }}
|