Skip to content

CI draft

CI draft #1

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["main"]
tags:
- "*"
pull_request:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
modify_and_release_apk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: rename files
run: |
mv obsidian.apk "${{ env.NEW_APK_NAME }}.apk"
mv ./obsidian/dist/obsidian.apk "./${{ env.NEW_APK_NAME }}-hooked-unsigned.apk"
mv "${{ steps.sign_app.outputs.signedReleaseFile }}" "${{ env.NEW_APK_NAME }}-hooked-signed.apk"
- name: save hashes in env
run: |
echo '```' > hashes.txt
echo "SHA256 hashes:" >> hashes.txt
sha256sum "${{ env.NEW_APK_NAME }}.apk" >> hashes.txt
sha256sum "${{ env.NEW_APK_NAME }}-hooked-unsigned.apk" >> hashes.txt
sha256sum "${{ env.NEW_APK_NAME }}-hooked-signed.apk" >> hashes.txt
echo '```' >> hashes.txt
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: hashes.txt
files: |
./${{ env.NEW_APK_NAME }}.apk
./${{ env.NEW_APK_NAME }}-hooked-unsigned.apk
./${{ env.NEW_APK_NAME }}-hooked-signed.apk