Skip to content

Commit

Permalink
Condense existing workflows into a single file with condition for rel…
Browse files Browse the repository at this point in the history
…eases
  • Loading branch information
62832 committed Jan 24, 2025
1 parent 9bd96b3 commit 05a74d2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 59 deletions.
43 changes: 36 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,51 @@
name: Build
on:
- pull_request
- push
pull_request:
push:
release:
types: [published]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
- name: Build
run: ./gradlew build
uses: gradle/actions/setup-gradle@v3
- name: Build release files
run: ./gradlew build
- name: Publish release files
if: ${{ github.event_name == 'release' }}
uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

curseforge-id: 622112
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}

modrinth-id: jjuIRIVr
modrinth-token: ${{ secrets.MODRINTH_API_KEY }}

game-versions: |
1.21
1.21.1
loaders: neoforge
dependencies: |
ae2(required){curseforge:223794}{modrinth:XxWD5pD3}
appmek(optional){curseforge:574300}{modrinth:IiATswDj}
ae2wtlib(optional){curseforge:459929}{modrinth:pNabrMMw}
arseng(optional){curseforge:905641}{modrinth:IJI3QuK8}
appflux(optional){curseforge:965012}
appex(optional){curseforge:1157608}{modrinth:yKwUnZCV}
# appbot(optional){curseforge:610632}{modrinth:545hUrw9}
51 changes: 0 additions & 51 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
val modId = "megacells"

base.archivesName = modId
version = System.getenv("MEGA_VERSION") ?: "0.0.0"
version = System.getenv("GITHUB_REF") ?: "0.0.0"
group = "gripe.90"

java.toolchain.languageVersion = JavaLanguageVersion.of(21)
Expand Down

0 comments on commit 05a74d2

Please sign in to comment.