Skip to content

Commit

Permalink
CI draft
Browse files Browse the repository at this point in the history
  • Loading branch information
erfur committed Feb 27, 2024
1 parent 6f36c17 commit 21ff9cb
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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

0 comments on commit 21ff9cb

Please sign in to comment.