fix(cache): Don't use cache after 1 day (#1) #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Make release | |
permissions: | |
contents: write | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
release-for-github: | |
name: "Release for GitHub" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 17 | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build release with Gradle | |
run: ./gradlew assembleRelease | |
- name: Get tag name | |
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: | |
releaseDirectory: app/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEYSTORE }} | |
alias: ${{ secrets.SIGNING_KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: Copy build artifacts | |
run: | | |
set -e | |
cp app/build/outputs/apk/release/app-release-unsigned-signed.apk alm-${{ env.VERSION_TAG }}.apk | |
sha=`sha256sum alm-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'` | |
echo "apk-sha256=$sha" >> $GITHUB_ENV | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ env.VERSION_TAG }} | |
name: Aniyomi Local Manager ${{ env.VERSION_TAG }} | |
body: | | |
--- | |
APK checksum: ${{ env.apk-sha256 }} | |
files: | | |
alm-${{ env.VERSION_TAG }}.apk | |
prerelease: false | |
draft: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |