diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8accd20..0b2eff7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,19 +6,19 @@ permissions: on: workflow_dispatch: release: - types: [created] + types: [published] jobs: build-and-sign: runs-on: ubuntu-latest steps: - name: Checkout Source - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref_name }} - name: Setup JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' @@ -42,13 +42,15 @@ jobs: run: ./gradlew assembleRelease - name: Store build Artifact - uses: action/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: release-${{ github.ref_name }} path: app/build/outputs/apk/release/app-release.apk - name: Upload to Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release upload ${{ github.ref_name }} app/build/outputs/apk/release/app-release.apk%#%SmartMouse-${{ github.ref_name }}.apk + gh release upload ${{ github.ref_name }} app/build/outputs/apk/release/app-release.apk#SmartMouse-${{ github.ref_name }}.apk