Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

ci: fix release

ci: fix release #11

Workflow file for this run

name: Release
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Build with Gradle
run: ./gradlew build
- name: Sign APK
id: sign_apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Prepare release
run: |
mkdir release
cp ${{ steps.sign_apk.outputs.signedReleaseFile }} release/LibrePass-signed.apk
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: apk
path: release/*
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get changelog
run: |
{
echo 'CHANGELOG<<CHANGELOG_EOF'
echo "$(./.github/scripts/get-changelog.sh)"
echo 'CHANGELOG_EOF'
} >> "$GITHUB_ENV"
- name: Download APK from build
uses: actions/download-artifact@v3
with:
name: apk
path: apk
- name: Create release
uses: softprops/[email protected]
if: github.event.inputs.isMock != 'mock'
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
tag_name: ${{ github.ref }}
fail_on_unmatched_files: true
name: Release ${{ github.ref_name }}
body: ${{ env.CHANGELOG }}
files: apk/*