diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 2c501703..37309bd0 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -1,6 +1,6 @@ name: Build All -on: workflow_dispatch +on: [ workflow_call, workflow_dispatch ] jobs: build-android-and-desktop-linux: @@ -32,7 +32,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: android - path: app/build/outputs/fdroid/**/*.apk + path: app/build/outputs/apk/fdroid/release/*.apk retention-days: 1 - name: Upload Desktop Build @@ -65,14 +65,12 @@ jobs: path: core/build/compose/jars/*.jar retention-days: 1 - publish: + verify-uploaded-builds: needs: [ build-android-and-desktop-linux, build-desktop-windows ] runs-on: ubuntu-latest steps: - name: Downloading artifacts uses: actions/download-artifact@v4 - - name: Create release - run: | - echo "TODO, create release here" - ls -R \ No newline at end of file + - name: Print all files + run: ls -R \ No newline at end of file diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index eb2ee804..15c1873a 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -6,37 +6,18 @@ on: - "v*.*" jobs: - Build: + build-all: + uses: ./.github/workflows/build-all.yml + secrets: inherit + create-release: runs-on: ubuntu-latest + needs: build-all steps: - - uses: actions/checkout@v3 + - name: Downloading artifacts + uses: actions/download-artifact@v4 - - name: set up JDK - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: gradle - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Prepare signing configuration - env: - KEYSTORE: ${{ secrets.KEYSTORE }} - run: echo $KEYSTORE | base64 --decode > keystore.jks - - - name: Build - env: - KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }} - SIGN_KEY: ${{ secrets.SIGN_KEY }} - SIGN_PASS: ${{ secrets.SIGN_PASS }} - run: | - ./gradlew app:assembleFdroidRelease - echo "OUTPUT_FILE_PATH=$(find ~+ -name "*.apk" -print -quit)" >> $GITHUB_ENV - - - name: Release + - name: Publish Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: ${{ env.OUTPUT_FILE_PATH }} + files: '**/*.@(jar|apk)'