-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
2 changed files
with
70 additions
and
0 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,36 @@ | ||
name: "CivModern Latest Gradle CI" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
workflow_dispatch: {} | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v3" | ||
|
||
- name: "Set up JDK 17" | ||
uses: "actions/setup-java@v3" | ||
with: | ||
java-version: 17 | ||
distribution: "corretto" | ||
cache: "gradle" | ||
|
||
- name: "Compiling CivModern" | ||
run: "./gradlew build" | ||
|
||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "Latest Build" | ||
files: | | ||
LICENSE.txt | ||
dist/*.jar |
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,34 @@ | ||
name: "CivModern Release Gradle CI" | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v3" | ||
|
||
- name: "Set up JDK 17" | ||
uses: "actions/setup-java@v3" | ||
with: | ||
java-version: 17 | ||
distribution: "corretto" | ||
cache: "gradle" | ||
|
||
- name: "Compiling CivModern" | ||
run: "./gradlew build" | ||
|
||
- name: "Publishing CivModern" | ||
run: | | ||
gh release upload ${{ github.event.release.tag_name }} "LICENSE.txt" --clobber | ||
for file in $(find "dist/" -maxdepth 1 -type f -name "*.jar"); do | ||
echo "Uploading $file" | ||
gh release upload ${{ github.event.release.tag_name }} "$file" --clobber | ||
done | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |