summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..59dc346a
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,39 @@
+name: Release
+
+on:
+ push:
+ tags: ['v*']
+
+jobs:
+ build:
+ name: Build OpenDC
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [ 15 ]
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - name: Validate Gradle wrapper
+ uses: gradle/wrapper-validation-action@v1
+ - name: Set up JDK
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+ - uses: actions/cache@v1
+ with:
+ path: ~/.gradle/caches
+ key: ${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('**/*.gradle*') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ matrix.java }}-gradle-
+ - name: Build with Gradle
+ run: ./gradlew :assembleDist
+ - name: Release
+ uses: softprops/action-gh-release@v1
+ with:
+ prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-m') }}
+ files: build/distributions/*
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}