generated from PurpurMC/Tentacles
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23835ee
commit 35cfb19
Showing
1 changed file
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
name: Build | ||
on: [ push, pull_request ] | ||
name: Build Graphite | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
env: | ||
version: 1.20.1 | ||
branch: ver/1.20.1 | ||
|
||
jobs: | ||
build: | ||
release: | ||
|
||
if: "!startsWith(github.event.commits[0].message, '[CI-SKIP]')" | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -10,9 +20,45 @@ jobs: | |
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Configure Git | ||
run: git config --global user.email "[email protected]" && git config --global user.name "Github Actions" | ||
|
||
- name: Apply patches | ||
run: ./gradlew applyPatches --stacktrace | ||
|
||
- name: Build | ||
run: ./gradlew build --stacktrace | ||
|
||
- name: Create Reobf Jar | ||
run: ./gradlew createReobfPaperclipJar --stacktrace | ||
|
||
- name: Create Mojang Jar | ||
run: ./gradlew createMojangPaperclipJar --stacktrace | ||
|
||
- name: Upload Artifacts | ||
if: github.ref_name != env.branch | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: Artifacts | ||
path: build/libs | ||
|
||
- name: Release Artifacts | ||
if: github.ref_name == env.branch | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
title: "Release #${{ env.workflow }}" | ||
automatic_release_tag: release-${{ env.workflow }} | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
files: build/libs/*.jar | ||
prerelease: false | ||
|
||
- name: Release Artifacts (Latest) | ||
if: github.ref_name == env.branch | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
title: "Release #${{ env.workflow }}" | ||
automatic_release_tag: latest-${{ env.version }} | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
files: build/libs/*.jar | ||
prerelease: false |