Skip to content

Add 24w46a data to web version info #116

Add 24w46a data to web version info

Add 24w46a data to web version info #116

Workflow file for this run

name: build
on: [ pull_request, push ]
jobs:
build:
strategy:
matrix:
java: [ 17 ]
os: [ ubuntu-24.04 ]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Setup java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: gradle
- name: Build
run: ./gradlew build
- name: capture fabric build artifacts
uses: actions/upload-artifact@v4
with:
name: StackDeobfuscator-Fabric-Artifacts
path: build/libs/StackDeobfuscatorFabric-*
if-no-files-found: error
- name: capture web build artifacts
uses: actions/upload-artifact@v4
with:
name: StackDeobfuscator-Web-Artifacts
path: build/libs/StackDeobfuscatorWeb-*
if-no-files-found: error
deploy_web:
needs: build
strategy:
matrix:
os: [ ubuntu-24.04 ]
runs-on: ${{ matrix.os }}
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- name: Download web artifact
uses: actions/download-artifact@v4
with:
name: StackDeobfuscator-Web-Artifacts
- name: Extract web artifact file name
id: name_finder
run: |
echo -n 'file_name=' >> "$GITHUB_OUTPUT" && ls . | grep all.jar >> "$GITHUB_OUTPUT"
- name: Deploy web
uses: burnett01/[email protected]
env:
INPUT_CENSOR_HOSTNAME: "${{ secrets.DEPLOY_SERVER_CENSOR }}"
with:
switches: -av --delete
path: "${{ steps.name_finder.outputs.file_name }}"
remote_user: "${{ secrets.DEPLOY_USER }}"
remote_host: "${{ secrets.DEPLOY_SERVER }}"
remote_key: "${{ secrets.DEPLOY_PRIVATE_KEY }}"
remote_path: "${{ secrets.DEPLOY_PATH }}"
- name: Trigger deploy hook
env:
INPUT_REMOTE_KEY: "${{ secrets.DEPLOY_PRIVATE_KEY }}"
INPUT_REMOTE_USER: "${{ secrets.DEPLOY_USER }}"
INPUT_REMOTE_HOST: "${{ secrets.DEPLOY_SERVER }}"
INPUT_REMOTE_TRIGGER_SCRIPT: "${{ secrets.DEPLOY_SCRIPT }}"
INPUT_PATH: "${{ steps.name_finder.outputs.file_name }}"
run: |
echo "$INPUT_REMOTE_KEY" > privkey
chmod 700 privkey
ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -i privkey -- "$INPUT_REMOTE_USER"@"$INPUT_REMOTE_HOST" "$INPUT_REMOTE_TRIGGER_SCRIPT" "$INPUT_PATH"
rm -f privkey