diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80e3b9d..2f3502e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,13 @@ +name: Make release + permissions: contents: write + on: push: tags: - v* + jobs: release-for-github: name: "Release for GitHub and F-Droid" @@ -11,6 +15,7 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 + - name: Setup JDK 17 uses: actions/setup-java@v4 with: @@ -19,6 +24,7 @@ jobs: - name: Make gradlew executable run: chmod +x ./gradlew + - name: Pre-build run: | set -e @@ -28,13 +34,16 @@ jobs: echo "BUILD_TIMESTAMP=$timestamp" >> $GITHUB_ENV chmod +x ./gradlew + - name: Build release with Gradle run: ./gradlew assembleRelease + - name: Get tag ame if: startsWith(github.ref, 'refs/tags/') run: | set -x echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + - name: Sign apk uses: r0adkll/sign-android-release@v1 with: @@ -45,6 +54,7 @@ jobs: keyPassword: ${{ secrets.KEY_PASSWORD }} env: BUILD_TOOLS_VERSION: "34.0.0" + - name: Copy build artifacts run: | set -e @@ -55,6 +65,7 @@ jobs: echo "apk-{}-sha256=$sha" >> $GITHUB_ENV' echo '{"timestamp": ${{ env.BUILD_TIMESTAMP }}}' | jq >> build-metadata.json + - name: Create release uses: softprops/action-gh-release@v1 with: