Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Syer10 committed Mar 29, 2024
1 parent 489331f commit 47d8477
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 50 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,62 +50,65 @@ jobs:
run:
shell: ${{ matrix.shell }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
architecture: ${{ matrix.arch }}

- name: Set up gradle
uses: gradle/actions/setup-gradle@v3

- name: Setup Cl
run: ${{ matrix.setupCl }}

- name: Setup MacOS Keychain
uses: apple-actions/import-codesign-certs@v1
uses: apple-actions/import-codesign-certs@v2
if: ${{ matrix.runtime == 'osx-x64' }}
with:
p12-file-base64: ${{ secrets.APPLE_CERT }}
p12-password: ${{ secrets.APPLE_CERT_PASSWORD }}

- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: >
${{ matrix.build }}
-Pcompose.desktop.mac.sign=true
-Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY }}
-Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }}
-Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }}
-Pcompose.desktop.mac.notarization.teamID=${{ secrets.APPLE_TEAM_ID }}
run: >
./gradlew
${{ matrix.build }}
-Pcompose.desktop.mac.sign=true
-Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY }}
-Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }}
-Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }}
-Pcompose.desktop.mac.notarization.teamID=${{ secrets.APPLE_TEAM_ID }}
- name: Sign APK
uses: r0adkll/sign-android-release@v1
uses: ilharp/sign-android-release@v1
if: ${{ matrix.runtime == 'android' }}
with:
releaseDirectory: android/build/outputs/apk/release
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
alias: ${{ secrets.ANDROID_KEY_ALIAS }}
signingKey: ${{ secrets.ANDROID_SIGNING_KEY }}
keyAlias: ${{ secrets.ANDROID_KEY_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}

# Upload runner package tar.gz/zip as artifact
- name: Publish Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: runner-package-${{ matrix.runtime }}
path: |
desktop/build/compose/binaries/main/*/
desktop/build/compose/binaries/main-release/*/
desktop/build/compose/jars/
!desktop/build/compose/binaries/main/app/
${{ env.SIGNED_RELEASE_FILE }}
${{ env.ANDROID_SIGNED_FILE }}
# Upload runner errors
- name: Upload error logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: runner-errors-${{ matrix.runtime }}
Expand All @@ -117,7 +120,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -137,7 +140,7 @@ jobs:

# Upload runner package tar.gz/zip as artifact
- name: Publish Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: runner-package-linux-fedora-x64
path: |
Expand All @@ -148,7 +151,7 @@ jobs:
# Upload runner errors
- name: Upload error logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: runner-errors-linux-fedora-x64
Expand All @@ -160,12 +163,12 @@ jobs:
needs: [ BuildBinaries,BuildRpm ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Build Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Fix rpm java dependency
uses: Syer10/Fedora-Java17-Action@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: Clone repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v2

# run_tests:
# name: Run Tests
Expand Down
54 changes: 28 additions & 26 deletions .github/workflows/Preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,24 @@ jobs:
run:
shell: ${{ matrix.shell }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
architecture: ${{ matrix.arch }}

- name: Set up gradle
uses: gradle/actions/setup-gradle@v3

- name: Setup Cl
run: ${{ matrix.setupCl }}

- name: Setup MacOS Keychain
uses: apple-actions/import-codesign-certs@v1
uses: apple-actions/import-codesign-certs@v2
if: ${{ matrix.runtime == 'osx-x64' }}
with:
p12-file-base64: ${{ secrets.APPLE_CERT }}
Expand All @@ -77,43 +80,42 @@ jobs:
echo "COMMIT_COUNT=$commit_count" >> $GITHUB_ENV
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: >
${{ matrix.build }}
-Pcompose.desktop.mac.sign=true
-Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY }}
-Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }}
-Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }}
-Pcompose.desktop.mac.notarization.teamID=${{ secrets.APPLE_TEAM_ID }}
-Ppreview="${{ env.COMMIT_COUNT }}"
--stacktrace
run: >
./gradlew
${{ matrix.build }}
-Pcompose.desktop.mac.sign=true
-Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY }}
-Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }}
-Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }}
-Pcompose.desktop.mac.notarization.teamID=${{ secrets.APPLE_TEAM_ID }}
-Ppreview="${{ env.COMMIT_COUNT }}"
--stacktrace
- name: Sign APK
uses: r0adkll/sign-android-release@v1
uses: ilharp/sign-android-release@v1
if: ${{ matrix.runtime == 'android' }}
with:
releaseDirectory: android/build/outputs/apk/release
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
alias: ${{ secrets.ANDROID_KEY_ALIAS }}
signingKey: ${{ secrets.ANDROID_SIGNING_KEY }}
keyAlias: ${{ secrets.ANDROID_KEY_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}

# Upload runner package tar.gz/zip as artifact
- name: Publish Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: runner-package-${{ matrix.runtime }}
path: |
desktop/build/compose/binaries/main/*/
desktop/build/compose/binaries/main-release/*/
desktop/build/compose/jars/
!desktop/build/compose/binaries/main/app/
${{ env.SIGNED_RELEASE_FILE }}
${{ env.ANDROID_SIGNED_FILE }}
# Upload runner errors
- name: Upload error logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: runner-errors-${{ matrix.runtime }}
Expand All @@ -125,7 +127,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -145,7 +147,7 @@ jobs:

# Upload runner package tar.gz/zip as artifact
- name: Publish Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: runner-package-linux-fedora-x64
path: |
Expand All @@ -156,7 +158,7 @@ jobs:
# Upload runner errors
- name: Upload error logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: runner-errors-linux-fedora-x64
Expand All @@ -168,12 +170,12 @@ jobs:
needs: [ BuildBinaries,BuildRpm ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Build Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Fix rpm java dependency
uses: Syer10/Fedora-Java17-Action@v1
Expand Down Expand Up @@ -228,7 +230,7 @@ jobs:
${{ env.COMMIT_LOGS }}
- name: Prune old releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_PREVIEW_TOKEN }}
with:
Expand Down

0 comments on commit 47d8477

Please sign in to comment.