From e394e795d768f608c0c520a011f3d3627a93f3ab Mon Sep 17 00:00:00 2001 From: Keuin Date: Wed, 28 Sep 2022 23:45:26 +0800 Subject: Add GitHub action: release --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yml (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1e3ba7a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: release + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +jobs: + release: + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/master' + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'adopt' + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Make gradlew executable + run: chmod +x gradlew + - name: Gradle build + run: ./gradlew build + - name: Print directory tree + run: find . + - name: Gradle test + run: ./gradlew test + - name: Get version string + run: export VERSION=$(echo ${{ github.ref }} | sed 's/-.\+//') + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file_glob: true + file: build/libs/kbackup-fabric* + tag: ${{ env.VERSION }} + release_name: ${{ env.VERSION }} + prerelease: true \ No newline at end of file -- cgit v1.2.3 From e9f273cd996c67272741bedbba3400a5b0e85a41 Mon Sep 17 00:00:00 2001 From: Keuin Date: Tue, 4 Oct 2022 02:12:04 +0800 Subject: Fix test CI JDK version. --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5795379..e7efb41 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,7 +11,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '15' + java-version: '17' distribution: 'adopt' - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 -- cgit v1.2.3