This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
Release v1.3.1 #26
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: 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@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup build tool version variable | |
shell: bash | |
run: | | |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) | |
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV | |
echo Last build tool version is: $BUILD_TOOL_VERSION | |
- 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 }} | |
env: | |
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | |
- name: Prepare release | |
run: | | |
mkdir release | |
cp ${{ steps.sign_apk.outputs.signedReleaseFile }} release/LibrePass-signed.apk | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
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@v4 | |
with: | |
name: apk | |
path: apk | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
if: github.event.inputs.isMock != 'mock' | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
tag_name: ${{ github.ref }} | |
fail_on_unmatched_files: true | |
name: ${{ github.ref_name }} | |
body: ${{ env.CHANGELOG }} | |
files: apk/* |