forked from FabricMC/yarn
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.19 KB
/
publish.yml
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
name: Publish
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
container:
image: openjdk:16-jdk
options: --user root
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
# Ensure that releases are not ran in parallel, this ensures that the latest commit is the latest release
# See https://github.com/softprops/turnstyle
- name: Turnstyle
uses: softprops/turnstyle@v1
with:
continue-after-seconds: 3600
same-branch-only: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 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 }}
- run: ./gradlew build javadocJar checkVersion publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
BRANCH_NAME: ${{ github.ref }}