diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a04f9c2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,68 @@ +name: Build RAVEN C2 Framework + +on: + push: + branches: ["dev"] + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set Up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: maven + + - name: Clear Maven JavaFX Cache + run: rm -rf ~/.m2/repository/org/openjfx + + - name: Build With Maven + working-directory: RAVEN + run: mvn clean package -DskipTests -Plinux + + - name: Copy JAR To Output Folder + run: | + JAR=$(ls RAVEN/target/*.jar | grep -v original | head -1) + mv "$JAR" RAVEN/raven.jar + rm -rf RAVEN/target + echo "JAR copied: $JAR" + + - name: Commit Output To Repo + run: | + git config user.name "github-actions" + git config user.email "github-actions@github.com" + git add RAVEN/raven.jar + git diff --cached --quiet || git commit -m "ci: build #${{ github.run_number }} [skip ci]" + git push + + - name: Upload JAR As Artifact + uses: actions/upload-artifact@v4 + with: + name: raven-jar + path: RAVEN/raven.jar + retention-days: 30 + + - name: Create Tag + run: | + git tag "RAVEN-C2-V3.0-${{ github.run_number }}" + git push origin "RAVEN-C2-V3.0-${{ github.run_number }}" + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + tag_name: v3.0-build-${{ github.run_number }} + name: "RAVEN C2 v3.0 - Build #${{ github.run_number }}" + files: output/raven.jar + generate_release_notes: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/RAVEN/raven.jar b/RAVEN/raven.jar new file mode 100644 index 0000000..b623b6d Binary files /dev/null and b/RAVEN/raven.jar differ