SnapEnhance Patch core.apk and Release #1
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: SnapEnhance Patch core.apk and Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Set JAVA_HOME | |
run: echo "JAVA_HOME=$(echo ${{ steps.setup-java.outputs.java-home }})" >> $GITHUB_ENV | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y jq curl | |
shell: bash | |
- name: Install unzip | |
run: sudo apt-get install unzip -y | |
- name: Install pup | |
run: | | |
wget https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip -O pup.zip | |
unzip pup.zip | |
chmod +x pup | |
sudo mv pup /usr/local/bin/ | |
working-directory: . | |
- name: Grant execute permissions to script | |
run: chmod +x betascript.sh | |
working-directory: . | |
- name: Run APK Download Script | |
run: | | |
./betascript.sh | |
- name: Run the command | |
run: | | |
java -jar lspatch.jar -m "$GITHUB_WORKSPACE/core.apk" -f -l 2 -v snap.apk | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: v2-snap-402-lspatched.apk | |
path: ./snap-402-lspatched.apk | |
- name: Check if the release already exists | |
id: check_release | |
run: | | |
RELEASE_VERSION=v0.0 # Change this to the initial release version | |
if curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION; then | |
echo "Release $RELEASE_VERSION already exists." | |
# Increment the release version | |
RELEASE_VERSION=$(echo $RELEASE_VERSION | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./') | |
fi | |
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV | |
- name: Create or Update Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: v2-snap-402-lspatched.apk | |
tag_name: ${{ env.RELEASE_VERSION }}-V2 # Append "-Beta" to the tag name |