From 7088dad4ebf2e19f76877112a918e71a300f3fa2 Mon Sep 17 00:00:00 2001 From: Dawson Date: Wed, 8 Apr 2026 13:38:46 -0400 Subject: [PATCH] Updating workflows to handle new build structure, removing maven workflows --- .github/workflows/create-release.yml | 6 ++-- .github/workflows/gradle.yml | 4 +-- .github/workflows/maven.yml | 44 ---------------------------- .github/workflows/test-gradle.yml | 2 +- .github/workflows/test.yml | 19 ------------ 5 files changed, 6 insertions(+), 69 deletions(-) delete mode 100644 .github/workflows/maven.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 003fd6f..f8ceaf6 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -17,13 +17,13 @@ jobs: with: gradle-version: 'wrapper' - name: Build - run: gradle build --no-daemon + run: ./gradlew build --no-daemon env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Version Number from Gradle id: get_version run: | - VERSION=$(gradle properties -q | awk -F': ' '/^version:/ {print $2; exit}') + VERSION=$(./gradlew properties -q | awk -F': ' '/^version:/ {print $2; exit}') echo "VERSION=$VERSION" >> "$GITHUB_ENV" - name: Extract latest CHANGELOG entry id: changelog @@ -49,6 +49,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./Universal/build/libs/AntiVPN-${{ env.VERSION }}-universal.jar + asset_path: ./build/libs/AntiVPN-${{ env.VERSION }}-universal.jar asset_name: AntiVPN-v${{ env.VERSION }}.jar asset_content_type: application/java-archive diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e5638fd..cbe2552 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -22,14 +22,14 @@ jobs: with: gradle-version: 'wrapper' - name: Build - run: gradle build --no-daemon + run: ./gradlew build --no-daemon env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload AntiVPN uses: actions/upload-artifact@v4 with: name: AntiVPN-Universal - path: Universal/build/libs/AntiVPN-*-universal.jar + path: build/libs/AntiVPN-*-universal.jar - name: Upload Sponge plugin uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index 550b098..0000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,44 +0,0 @@ -on: - push: - branches: [master] - pull_request: - branches: [master] - workflow_dispatch: - -jobs: - build: - name: Build and Test - runs-on: ubuntu-latest - - steps: - - name: Cache local Maven repository - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - uses: actions/checkout@v5 - - name: Set up JDK 21 - uses: actions/setup-java@v5 - with: - java-version: '21' - distribution: 'zulu' - - name: Set up Maven - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.9.6 - - name: Compile - run: mvn -B package --file pom.xml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload AntiVPN - uses: actions/upload-artifact@v4 - with: - name: AntiVPN-Universal - path: Universal/target/AntiVPN-*.jar - - name: Upload Sponge plugin - uses: actions/upload-artifact@v4 - with: - name: AntiVPN-Sponge - path: Sponge/target/Sponge-*.jar diff --git a/.github/workflows/test-gradle.yml b/.github/workflows/test-gradle.yml index 63eb3bd..0ccf222 100644 --- a/.github/workflows/test-gradle.yml +++ b/.github/workflows/test-gradle.yml @@ -17,6 +17,6 @@ jobs: with: gradle-version: 'wrapper' - name: Build - run: gradle build --no-daemon + run: ./gradlew build --no-daemon env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a7de87b..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,19 +0,0 @@ -on: - push: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: 21.0 - distribution: 'zulu' - cache: 'maven' - - name: Compile - run: mvn -B package --file pom.xml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}