From c787a0b219a4db3283fbe9e8f41b036880806104 Mon Sep 17 00:00:00 2001 From: IanTapply22 Date: Sun, 26 May 2024 14:04:16 -0400 Subject: [PATCH] clean: Commented and remove unneeded CI refrences --- .github/workflows/build.yml | 15 ++++++++++---- .github/workflows/changelog.yml | 23 +++++++++++++-------- .github/workflows/dependency-submission.yml | 12 +++++++---- .github/workflows/publish.yml | 10 +++++++-- 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cec3c0c..836d352 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,6 @@ -name: Build CI with multiple platforms/configs +name: Build on Latest and All Platforms +# Triggered on both PRs and pushes to main on: push: branches: [ "main" ] @@ -7,6 +8,7 @@ on: branches: [ "main" ] jobs: + # Runs on Ubuntu latest (version 22.04) ubunutu: name: 'Build Ubuntu Latest' runs-on: ubuntu-latest @@ -14,6 +16,7 @@ jobs: permissions: contents: read + # This will run on the JDK environment specified above steps: - uses: actions/checkout@v4 - name: Set up JDK ${{ vars.JAVA_VERSION }} @@ -23,11 +26,12 @@ jobs: distribution: ${{ vars.UBUNTU_DISTRIBUTION }} - name: Setup Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + uses: gradle/gradle-build-action@v3 - name: Build with Gradle Wrapper run: ./gradlew build --scan + # Runs on MacOS latest (version 12.0) macos: name: 'Build MacOS Latest' runs-on: macos-latest @@ -35,6 +39,7 @@ jobs: permissions: contents: read + # This will run on the JDK environment specified above steps: - uses: actions/checkout@v4 - name: Set up JDK ${{ vars.JAVA_VERSION }} @@ -44,11 +49,12 @@ jobs: distribution: ${{ vars.MACOS_DISTRIBUTION }} - name: Setup Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + uses: gradle/gradle-build-action@v3 - name: Build with Gradle Wrapper run: ./gradlew build --scan + # Runs on Windows latest (version 2022) windows: name: 'Build Windows Latest' runs-on: windows-latest @@ -56,6 +62,7 @@ jobs: permissions: contents: read + # This will run on the JDK environment specified above steps: - uses: actions/checkout@v4 - name: Set up JDK ${{ vars.JAVA_VERSION }} @@ -65,7 +72,7 @@ jobs: distribution: ${{ vars.WINDOWS_DISTRIBUTION }} - name: Setup Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + uses: gradle/gradle-build-action@v3 - name: Build with Gradle Wrapper run: ./gradlew build --scan \ No newline at end of file diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 77e7e95..5246832 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,39 +1,42 @@ name: Publish Changelog +# Triggered on pushes to main on: push: branches: [ "main" ] - workflow_dispatch: - +# Jobs are only triggered when the commit message starts with 'feat' jobs: + # Fetches the Gradle version from build.gradle version: name: Fetch Gradle Version if: ${{ startsWith(github.event.head_commit.message, 'feat') }} runs-on: ubuntu-latest + + # This job outputs the Gradle version outputs: version: ${{ steps.version.outputs.version }} + + # Fetch and output the Gradle version steps: - uses: actions/checkout@v2 - uses: thecodemonkey/action-get-gradle-version@master id: version - run: 'echo version ${{ steps.version.outputs.version }}' + # Creates a new GitHub release containing the changelog and dependency information release: name: Create GitHub Release - runs-on: ubuntu-latest if: ${{ startsWith(github.event.head_commit.message, 'feat') }} - needs: version + runs-on: ubuntu-latest + needs: version # This job depends on the version job steps: - uses: actions/checkout@v4 - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' + # Gets the previous tag and stores it in the environment - run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV + # Generate the changelog content (commit messages) between the previous tag and the current commit - name: Generate changelog id: changelog uses: jaywcjlove/changelog-generator@main @@ -41,9 +44,11 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' + # Outputs the changelog content - name: Get the changelog run: echo "${{ steps.changelog.outputs.changelog }}" + # Create a new GitHub release with the changelog content and the dependency information - name: Create github release id: create_release uses: actions/create-release@latest diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml index 9649b98..ff23a07 100644 --- a/.github/workflows/dependency-submission.yml +++ b/.github/workflows/dependency-submission.yml @@ -1,5 +1,6 @@ name: Submit Dependency Summary +# Triggered on both PRs and pushes to main on: push: branches: [ "main" ] @@ -7,19 +8,22 @@ on: branches: [ "main" ] jobs: + # Runs on Ubuntu latest (version 22.04) dependency-submission: name: Generate and submit dependency graph runs-on: ubuntu-latest + environment: jdk21-flat permissions: contents: write + # This will run on the JDK environment specified above steps: - uses: actions/checkout@v4 - - name: Set up JDK 21 + - name: Set up JDK ${{ vars.JAVA_VERSION }} uses: actions/setup-java@v4 with: - java-version: '21' - distribution: 'temurin' + java-version: ${{ vars.JAVA_VERSION }} + distribution: ${{ vars.JAVA_DISTRIBUTION }} - name: Generate and submit dependency graph - uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + uses: gradle/gradle-build-action@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9d482e4..bdf7e35 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,24 +1,30 @@ name: Publish Package to GitHub Packages +# Triggered on pushes to main on: push: branches: [ "main" ] +# Jobs are only triggered when the commit message starts with 'feat' jobs: + # Fetches the Gradle version from build.gradle version: name: Fetch Gradle Version if: ${{ startsWith(github.event.head_commit.message, 'feat') }} runs-on: ubuntu-latest + # This job outputs the Gradle version outputs: version: ${{ steps.version.outputs.version }} + # Fetch and output the Gradle version steps: - uses: actions/checkout@v2 - uses: thecodemonkey/action-get-gradle-version@master id: version - run: 'echo version ${{ steps.version.outputs.version }}' + # Publishes the package to GitHub Packages publish: name: Publish Package if: ${{ startsWith(github.event.head_commit.message, 'feat') }} @@ -29,16 +35,16 @@ jobs: contents: read packages: write + # This job publishes the package to GitHub Packages via ./gradlew publish steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 with: java-version: ${{ vars.JAVA_VERSION }} distribution: ${{ vars.JAVA_DISTRIBUTION }} - name: Setup Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + uses: gradle/gradle-build-action@v3 - name: Publish package run: ./gradlew publish