aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release-latest.yml
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2021-11-24 22:21:21 +0800
committerGlease <4586901+Glease@users.noreply.github.com>2021-11-24 23:47:45 +0800
commitb0698efc456a3dc92a8b7a059b01433d461866e3 (patch)
treee0f5025c80e105222d59fda860327e66f80045b1 /.github/workflows/release-latest.yml
downloadGT5-Unofficial-b0698efc456a3dc92a8b7a059b01433d461866e3.tar.gz
GT5-Unofficial-b0698efc456a3dc92a8b7a059b01433d461866e3.tar.bz2
GT5-Unofficial-b0698efc456a3dc92a8b7a059b01433d461866e3.zip
Initial commit
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Diffstat (limited to '.github/workflows/release-latest.yml')
-rw-r--r--.github/workflows/release-latest.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/release-latest.yml b/.github/workflows/release-latest.yml
new file mode 100644
index 0000000000..5ecccc044f
--- /dev/null
+++ b/.github/workflows/release-latest.yml
@@ -0,0 +1,44 @@
+# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
+# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
+
+name: Release latest build
+
+on:
+ push:
+ branches: [ master, main ]
+
+jobs:
+ build-and-release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: Set release version
+ run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
+
+ - name: Set up JDK 8
+ uses: actions/setup-java@v2
+ with:
+ java-version: '8'
+ distribution: 'adopt'
+ cache: gradle
+
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+
+ - name: Setup the workspace
+ run: ./gradlew setupCIWorkspace
+
+ - name: Build the mod
+ run: ./gradlew build
+
+ - name: Update latest tag
+ uses: "marvinpinto/action-automatic-releases@latest"
+ with:
+ repo_token: "${{ secrets.GITHUB_TOKEN }}"
+ automatic_release_tag: "latest"
+ prerelease: false
+ title: "Latest build"
+ files: build/libs/*.jar