From 6f2928c0128b54a85d7024d760d4f65d47dc8506 Mon Sep 17 00:00:00 2001 From: Tim Kluge Date: Sun, 15 Dec 2024 19:27:42 +0100 Subject: [PATCH] Merge actions --- .github/workflows/android.yml | 30 ++++++++++++++++--------- .github/workflows/release.yml | 42 ----------------------------------- 2 files changed, 19 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 969e88e..7fd4a93 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -4,6 +4,7 @@ on: workflow_dispatch: push: branches: [ "master" ] + tags: [ "*" ] pull_request: branches: [ "master" ] @@ -37,15 +38,22 @@ jobs: - name: Archive APK uses: actions/upload-artifact@v4 with: - name: app-release.apk - path: app/build/outputs/apk/release/app-release.apk - - name: Archive app manifest - uses: actions/upload-artifact@v4 + name: app-artifacts + path: | + app/build/outputs/apk/release/app-release.apk + app/manifest.json + app/karoo-reminder.png + + - name: Create Release + id: create_release + uses: ncipollo/release-action@v1 + if: startsWith(github.ref, 'refs/tags/') with: - name: manifest.json - path: app/manifest.json - - name: Archive app icon - uses: actions/upload-artifact@v4 - with: - name: karoo-reminder.png - path: app/karoo-reminder.png \ No newline at end of file + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: true + prerelease: false + generateReleaseNotes: true + artifacts: app/build/outputs/apk/release/app-release.apk, app/manifest.json, app/karoo-reminder.png + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 9d8661a..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v*.*.*' - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Download APK artifact - uses: actions/download-artifact@v4 - with: - name: app-release.apk - - - name: Download manifest artifact - uses: actions/download-artifact@v4 - with: - name: manifest.json - - - name: Download app icon artifact - uses: actions/download-artifact@v4 - with: - name: karoo-reminder.png - - - name: Create Release - id: create_release - uses: ncipollo/release-action@v1 - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: true - prerelease: false - generateReleaseNotes: true - artifacts: app-release.apk, manifest.json, karoo-reminder.png - - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file