Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
b4byhuey authored Aug 28, 2023
1 parent 2e4a30d commit d691f52
Showing 1 changed file with 44 additions and 38 deletions.
82 changes: 44 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Windows Build
on:
push:
branches:
Expand All @@ -21,60 +21,35 @@ env:
BINARY_PATH: brut.apktool/apktool-lib/src/main/resources/prebuilt

jobs:
analyze-mac-aapt:
runs-on: macos-latest
strategy:
matrix:
file: [ aapt_64, aapt2_64 ]
steps:
- uses: actions/checkout@v3
- name: Verify Executable
run: ${{ env.BINARY_PATH }}/macosx/${{ matrix.file }} version
- name: Output Static
run: otool -L ${{ env.BINARY_PATH }}/macosx/${{ matrix.file }} || true

analyze-linux-aapt:
runs-on: ubuntu-latest
strategy:
matrix:
file: [ aapt, aapt_64, aapt2, aapt2_64 ]
steps:
- uses: actions/checkout@v3
- name: Verify Executable
run: ${{ env.BINARY_PATH }}/linux/${{ matrix.file }} version
- name: Output Static
run: ldd ${{ env.BINARY_PATH }}/linux/${{ matrix.file }} || true

analyze-windows-aapt:
runs-on: windows-latest
strategy:
matrix:
file: [ aapt.exe, aapt_64.exe, aapt2.exe, aapt2_64.exe ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.0.2
- name: Verify Executable
run: ${{ env.BINARY_PATH }}/windows/${{ matrix.file }} version
- name: Output Static
run: ldd ${{ env.BINARY_PATH }}/windows/${{ matrix.file }} || true

build-and-test-with-Java-8-and-later:
build-apktool:
runs-on: ${{ matrix.os }}
needs:
- analyze-mac-aapt
- analyze-linux-aapt
needs:
- analyze-windows-aapt
name: Build/Test (JDK ${{ matrix.java }}, ${{ matrix.os }})
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
java: [ 8, 11, 17, 18, 19, 20 ]
os: [ windows-latest ]
java: [ 20 ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.0.2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}

- name: Build and test
uses: gradle/gradle-build-action@v2.7.1
with:
Expand All @@ -83,11 +58,11 @@ jobs:
upload-artifact:
runs-on: ubuntu-latest
name: Build apktool.jar
if: github.repository == 'iBotPeaches/Apktool' && github.ref == 'refs/heads/master'
if: github.repository == 'b4byhuey/Apktool' && github.ref == 'refs/heads/master'
needs:
- build-and-test-with-Java-8-and-later
- analyze-windows-aapt
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.0.2
with:
fetch-depth: 0
- uses: actions/setup-java@v3
Expand All @@ -99,7 +74,38 @@ jobs:
with:
arguments: build shadowJar proguard
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v3.1.0
with:
name: apktool.jar
path: brut.apktool/apktool-cli/build/libs/apktool-v*

deploy_nightly:
name: Deploy Nightly Build
runs-on: ubuntu-latest
needs: [build-apktool]
steps:
- uses: actions/checkout@v3.0.2

- name: Download Apktool
uses: actions/download-artifact@v3
with:
name: apktool.jar
path: win/

- name: Remove the old Release
uses: dev-drprasad/delete-older-releases@v0.2.0
with:
keep_latest: 0
delete_tag_pattern: "windows"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: ncipollo/release-action@v1.10.0
with:
artifacts: "win/*.*"
name: "Snapshots for Windows"
prerelease: true
replacesArtifacts: false
allowUpdates: false
tag: windows
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d691f52

Please sign in to comment.