forked from neoforged/NeoForge
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.15 KB
/
publish-prs.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
37
38
39
40
41
42
43
name: Publish PRs
on:
pull_request:
types:
- opened
- synchronize
permissions:
contents: read
statuses: write
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true
# Switch to a new branch with the PR number and PR branch name,
# for the projects where the buildscript uses the branch name
- name: Create branch for commit
run:
git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}
- name: Make Gradle executable
# language=bash
run: chmod +x ./gradlew # Thanks Windows
- name: Setup Java 17
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#java
# language=bash
run: export JAVA_HOME=$(echo $JAVA_HOME_17_X64)
- uses: gradle/gradle-build-action@v2
name: Setup
with:
arguments: :neoforge:setup
- uses: ForgeForce/action-pr-publishing/upload@main