Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
ci: Rework CI
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Nov 6, 2023
1 parent c1992a7 commit 1847aab
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
13 changes: 13 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Setup environment"
description: "Set up Java environment"
runs:
using: "composite"
steps:
- name: "Validate gradle"
uses: gradle/wrapper-validation-action@v1
- name: "Setup JDK"
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
- run: chmod +x ./gradlew
12 changes: 3 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

container:
image: openjdk:17-jdk
options: --user root

steps:
- uses: actions/checkout@v2.2.0
- run: |
chmod +x ./gradlew
./gradlew build
- uses: ./.github/actions/setup
- name: "Build LibreExpFix"
run: ./gradlew build
- uses: actions/upload-artifact@v2
with:
name: build-artifacts
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ on: [workflow_dispatch]
jobs:
release:
runs-on: ubuntu-latest

container:
image: openjdk:17-jdk
options: --user root

steps:
- uses: actions/checkout@v2.2.0
- run: |
chmod +x ./gradlew
./gradlew build curseforge modrinth --stacktrace
- uses: ./.github/actions/setup
- name: "Build and Deploy"
run: ./gradlew build curseforge modrinth --stacktrace
env:
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}

0 comments on commit 1847aab

Please sign in to comment.