forked from MinecraftForge/ForgeGradle
-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0e4f4fd
commit 0eb30bd
Showing
4 changed files
with
107 additions
and
33 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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Server builds | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
tags: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- run: git fetch -a | ||
- name: Setup Java 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
# - name: Cache .gradle | ||
# uses: burrunan/gradle-cache-action@v1 | ||
# with: | ||
# # Enable concurrent cache save and restore | ||
# # Default is concurrent=false for better log readability | ||
# concurrent: true | ||
# # Disable caching of $HOME/.gradle/caches/*.*/generated-gradle-jars | ||
# save-generated-gradle-jars: false | ||
# # Disable publishing Gradle Build Scan URL to job report #Don't | ||
# gradle-build-scan-report: true | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Build | ||
run: ./gradlew build | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.ref_type == 'tag' | ||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get Version Name | ||
id: version_name | ||
run: | | ||
echo version=${GITHUB_REF#refs/tags/v} >> $GITHUB_OUTPUT | ||
- run: git fetch -a | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Build with Gradle | ||
uses: gradle/[email protected] | ||
with: | ||
arguments: publish | ||
env: | ||
KETTINGUSERNAME: ${{ secrets.KETTINGUSERNAME }} | ||
KETTINGPASSWORD: ${{ secrets.KETTINGPASSWORD }} | ||
VERSION: ${{ steps.version_name.outputs.version }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create Release | ||
run: | | ||
gh release create "v$VERSION" build/libs/mixingradle-$VERSION.jar build/libs/mixingradle-$VERSION-groovydoc.jar \ | ||
--repo="$GITHUB_REPOSITORY" \ | ||
--title="${GITHUB_REPOSITORY#*/} v$VERSION" \ | ||
--generate-notes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ steps.version_name.outputs.version }} |
This file was deleted.
Oops, something went wrong.
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
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