diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5a64108 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,77 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + # Decode the base64-encoded keystore stored in GitHub Secrets and write it + # to a file that Gradle can reference during the signing step. + - name: Decode keystore + run: | + echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > ${{ github.workspace }}/release.jks + chmod 600 ${{ github.workspace }}/release.jks + + # Write keystore.properties so that app/build.gradle.kts can pick up + # all signing credentials at build time (mirrors keystore.properties.template). + - name: Write keystore.properties + run: | + cat > ${{ github.workspace }}/keystore.properties <