Skip to content

Commit

Permalink
Added 1.20.1 CI
Browse files Browse the repository at this point in the history
  • Loading branch information
LatvianModder committed Aug 21, 2024
1 parent fd576ef commit d273e43
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build_2001.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Java CI (1.20.1)

on:
push:
branches:
- '2001'
workflow_dispatch:
branches:
- '2001'
inputs:
release_type:
description: 'Release Type'
required: true
type: choice
default: 'release'
options:
- 'release'
- 'beta'
- 'alpha'
- 'none'

jobs:
build:
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[ci skip]')
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 30

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Build and Publish with Gradle
uses: gradle/gradle-build-action@v2
env:
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
SAPS_TOKEN: ${{ secrets.SAPS_TOKEN }}
with:
arguments: build -x test publish --stacktrace --no-daemon

- name: Release to CurseForge
uses: gradle/gradle-build-action@v2
if: ${{ github.event_name == 'workflow_dispatch' && inputs.release_type != 'none' }}
env:
GIT_COMMIT: ${{ github.event.after }}
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
RELEASE_TYPE: ${{ inputs.release_type }}
with:
arguments: publishUnified --stacktrace --no-daemon

0 comments on commit d273e43

Please sign in to comment.