Skip to content

Script changes

Script changes #1

Workflow file for this run

name: Make Release
on:
push:
tags: '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Source Code Download
run: git clone --branch stable --single-branch --recurse-submodules https://github.com/DHD2280/Oxygen-Customizer-AI-Plugin.git .
- name: Setup JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Shell Scripts Permissions
run: chmod +x .github/*.sh
- name: Version Bump
run: .github/bumpVersion.sh
- name: Gradlew Permissions
run: chmod +x gradlew
- name: Signature files preparation
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> keystore.properties
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> keystore.properties
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> keystore.properties
echo storeFile='${{ github.workspace }}/key.jks' >> keystore.properties
echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks
fi
- name: Gradle Build
run: ./gradlew assembleRelease
- name: Upload Zip
uses: actions/upload-artifact@v4.3.1
with:
name: OxygenCustomizer
path: app/build/outputs/apk/release/*.apk
- name: Release the binaries
uses: ncipollo/release-action@v1.14.0
with:
tag: ${{ github.ref }}
name: ${{ github.ref_name }}
prerelease: false
draft: false
artifacts: 'app/build/outputs/apk/release/*.apk'
bodyFile: 'releaseNotes.md'
- name: Commit version bump
uses: github-actions-x/commit@v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'stable'
commit-message: 'Version update: Release'
force-add: 'true'
files: app/build.gradle.kts latestStable.json StableChangelog.md
name: GitHub
email: OxygenCustomizer@dhd.it
- name: Telegram Channel Post
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.OC_CHANNEL }}
token: ${{ secrets.TELEGRAM_TK }}
message: ${{ env.TMessage }}
format: markdown
- name: Zip artifact for deployment
run: cd ./app/build/outputs/apk/release/ && zip OxygenCustomizer.zip *.apk -r
- name: Telegram File Attachment
if: github.repository == 'DHD2280/Oxygen-Customizer'
run: |
curl -v "https://api.telegram.org/bot${{ secrets.TELEGRAM_TK }}/sendMediaGroup" \
-F chat_id=${{ secrets.OC_CHANNEL }} \
-F media='[{"type":"document", "media":"attach://Xposed", "caption":"Oxygen Customizer ${{ github.ref }}"}]' \
-F Xposed="@app/build/outputs/apk/release/OxygenCustomizer.zip"