From c0fab0c40a46ab5ce1e4d710a0ed8de786893c96 Mon Sep 17 00:00:00 2001 From: Hugo Landrin Date: Wed, 15 Mar 2023 20:12:32 +0100 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fa620f6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release + +on: + release: + types: + - published + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/loom-cache + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + gradle- + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew build + + - name: Upload GitHub release + uses: AButler/upload-release-assets@v2.0 + with: + files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar' + repo-token: ${{ secrets.GITHUB_TOKEN }}