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' }}
|
2022-09-19 13:18:02 -04:00
|
|
|
runs-on: ubuntu-22.04
|
2020-11-06 18:33:17 -05:00
|
|
|
container:
|
2024-02-08 03:52:35 -05:00
|
|
|
image: eclipse-temurin:21-jdk
|
2020-11-06 18:33:17 -05:00
|
|
|
options: --user root
|
|
|
|
steps:
|
2024-02-08 03:52:35 -05:00
|
|
|
- uses: actions/checkout@v4
|
2020-11-06 18:33:17 -05:00
|
|
|
# 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
|
2023-05-04 10:57:42 -04:00
|
|
|
uses: onyxmueller/build-tag-number@v1
|
2020-11-06 18:33:17 -05:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.github_token }}
|
2023-05-04 11:01:13 -04:00
|
|
|
prefix: "build/${{ github.ref }}"
|
2020-11-06 18:33:17 -05:00
|
|
|
|
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 }}
|