Skip to content

Commit

Permalink
Adjust workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ThexXTURBOXx committed Dec 5, 2023
1 parent b142393 commit 3f0104e
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 39 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/gradle.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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: Java CI with Gradle

on:
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: 'gradle'

- name: Build dex-tools with Gradle
run: ./gradlew check distZip

- name: Archive dex tools
uses: actions/upload-artifact@v3
if: success()
with:
name: dex-tools
path: dex-tools/build/distributions/dex-tools-*.zip
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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: Java CI with Gradle

on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: 'gradle'

- name: Build dex-tools with Gradle
run: ./gradlew check distZip

- uses: ncipollo/release-action@v1
if: success()
with:
tag: 2.4.${{ github.run_number }}
artifacts: dex-tools/build/distributions/dex-tools-*.zip

- name: Archive dex tools
uses: actions/upload-artifact@v3
if: success()
with:
name: dex-tools
path: dex-tools/build/distributions/dex-tools-*.zip

- name: Publish to Maven Central
run: ./gradlew publish -Pversion=2.4.${{ github.run_number }}

0 comments on commit 3f0104e

Please sign in to comment.