-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
NEWVERCODE=$(($(cat app/build.gradle | grep versionCode | tr -s ' ' | cut -d " " -f 2 | tr -d '\r')+1)) | ||
NEWVERNAME="canary-$NEWVERCODE" | ||
|
||
sed -i 's/versionCode.*/versionCode '$NEWVERCODE'/' app/build.gradle | ||
sed -i 's/versionName.*/versionName "'$NEWVERNAME'"/' app/build.gradle | ||
|
||
sed -i 's/version=.*/version='$NEWVERNAME'/' MagiskModBase/module.prop | ||
sed -i 's/versionCode=.*/versionCode='$NEWVERCODE'/' MagiskModBase/module.prop | ||
|
||
sed -i 's/"version":.*/"version": "'$NEWVERNAME'",/' latestCanary.json | ||
sed -i 's/"versionCode":.*/"versionCode": '$NEWVERCODE',/' latestCanary.json | ||
|
||
sed -i 's/"version":.*/"version": "'$NEWVERNAME'",/' MagiskModuleUpdate_Xposed.json | ||
sed -i 's/"versionCode":.*/"versionCode": '$NEWVERCODE',/' MagiskModuleUpdate_Xposed.json | ||
|
||
sed -i 's/"version":.*/"version": "'$NEWVERNAME'",/' MagiskModuleUpdate_Full.json | ||
sed -i 's/"versionCode":.*/"versionCode": '$NEWVERCODE',/' MagiskModuleUpdate_Full.json | ||
|
||
#sed -i 's/"zipUrl_Xposed":.*/"zipUrl_Xposed": "https:\/\/nightly.link\/siavash79\/AOSPMods\/actions\/runs\/'$1'\/AOSPMods_Xposed.zip",/' latestCanary.json | ||
#sed -i 's/"zipUrl_Full":.*/"zipUrl_Full": "https:\/\/nightly.link\/siavash79\/AOSPMods\/actions\/runs\/'$1'\/AOSPMods_Full.zip",/' latestCanary.json | ||
|
||
# module changelog | ||
echo "**$NEWVERNAME** " > newChangeLog.md | ||
cat changeLog.md >> newChangeLog.md | ||
echo " " >> newChangeLog.md | ||
cat BetaChangelog.md >> newChangeLog.md | ||
mv newChangeLog.md BetaChangelog.md | ||
|
||
echo "*$NEWVERNAME* released in beta channel " > telegram.msg | ||
echo " " >> telegram.msg | ||
echo "*Changelog:* " >> telegram.msg | ||
cat changeLog.md >> telegram.msg | ||
echo 'TMessage<<EOF' >> $GITHUB_ENV | ||
cat telegram.msg >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Editing this file will trigger the build script for a new beta release |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# reset the file - most likely not needd | ||
rm -f changeLog.md | ||
rm -f Tchangelog.htm | ||
touch changeLog.md | ||
touch Tchangelog.htm | ||
|
||
#find the last time we made a changelog | ||
LASTUPDATE=$(git log -100 | grep -B 4 "Version update: Release" | grep "commit" -m 1 | cut -d " " -f 2) | ||
#find commits since - starting with the magic phrase | ||
COMMITS=$(git rev-list $LASTUPDATE..HEAD --grep "^CHANGELOG: ") | ||
#separator is newline | ||
IFS=$'\n' | ||
for COMMIT in $COMMITS | ||
do | ||
COMMITMSGS=$(git show $COMMIT --pretty=format:"%s" | grep "^CHANGELOG: " | tr -d '\0') | ||
for LINE in $COMMITMSGS | ||
do | ||
#save in the temp file to be used by next script | ||
echo "- "${LINE##*CHANGELOG: }" " >> changeLog.md | ||
done | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Make Canary Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'beta' | ||
paths: | ||
- '.github/edit2MakeNewBeta' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Source Code Download | ||
run: git clone --branch canary --single-branch --recurse-submodules https://github.com/DHD2280/Oxygen-Customizer.git . | ||
|
||
- name: JDK 17 Setup | ||
uses: actions/[email protected] | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: gradle | ||
|
||
- name: Shell Scripts Permissions | ||
run: chmod +x .github/*.sh | ||
|
||
- name: Changelog Generation | ||
run: .github/extractChanges.sh | ||
|
||
- name: Version Bump | ||
run: .github/bumpVersion.sh ${{ github.run_id }} | ||
|
||
- 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 Xposed Artifact to Actions | ||
uses: actions/[email protected] | ||
with: | ||
name: OxygenCustomizer.apk | ||
path: output | ||
|
||
- name: Oxygen Customizer Binary Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
tag: 'beta_builds' | ||
name: 'Latest Beta' | ||
omitBodyDuringUpdate: true | ||
prerelease: true | ||
allowUpdates: true | ||
replacesArtifacts: true | ||
draft: false | ||
artifacts: 'output/*.*' | ||
|
||
- name: Version Bump Commit | ||
uses: github-actions-x/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
push-branch: 'beta' | ||
commit-message: 'Version update: Release' | ||
force-add: 'true' | ||
files: app/build.gradle latestVersion.json BetaChangelog.md latestBeta.json | ||
name: GitHub | ||
email: [email protected] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"version": "beta-3", | ||
"versionCode": 3, | ||
"apkUrl": "https://github.com/DHD2280/Oxygen-Customizer/releases/download/beta_builds/OxygenCustomizer.apk", | ||
"changelog": "https://raw.githubusercontent.com/DHD2280/Oxygen-Customizer/beta/BetaChangelog.md" | ||
} |