Skip to content

Updated Upstream (Purpur) #45

Updated Upstream (Purpur)

Updated Upstream (Purpur) #45

Workflow file for this run

name: Build Graphite
on:
push:
branches:
- "ver/1.20.1"
workflow_dispatch:
env:
version: 1.20.1
branch: ver/1.20.1
jobs:
release:
if: "!startsWith(github.event.commits[0].message, '[CI-SKIP]')"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Configure Git
run: |
git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions"
echo "workflow=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
- name: Apply patches
run: ./gradlew applyPatches --stacktrace
- name: Build
run: ./gradlew build --stacktrace
- name: Publish
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: publish -PgraphitemcUsername=${{ secrets.REPO_USERNAME }} -PgraphitemcPassword=${{ secrets.REPO_TOKEN }}
- name: Create Reobf Jar
run: ./gradlew createReobfPaperclipJar --stacktrace
- name: Create Mojmap Jar
run: ./gradlew createMojmapPaperclipJar --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