chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin #728
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: Main | |
on: | |
push: | |
schedule: | |
- cron: '21 5 22 * *' | |
env: | |
ARTIFACT: wait-for-ports | |
GRAALVM_VERSION: 22.2.0 | |
JAVA_VERSION: 21 | |
jobs: | |
debug: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJSON(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Dump job context | |
env: | |
JOB_CONTEXT: ${{ toJSON(job) }} | |
run: echo "$JOB_CONTEXT" | |
- name: Dump steps context | |
env: | |
STEPS_CONTEXT: ${{ toJSON(steps) }} | |
run: echo "$STEPS_CONTEXT" | |
- name: Dump runner context | |
env: | |
RUNNER_CONTEXT: ${{ toJSON(runner) }} | |
run: echo "$RUNNER_CONTEXT" | |
- name: Dump strategy context | |
env: | |
STRATEGY_CONTEXT: ${{ toJSON(strategy) }} | |
run: echo "$STRATEGY_CONTEXT" | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJSON(matrix) }} | |
run: echo "$MATRIX_CONTEXT" | |
- name: Dump environment variables | |
run: set | |
version: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
outputs: | |
new_version: ${{ steps.output.outputs.new_version }} | |
build_timestamp: ${{ steps.output.outputs.build_timestamp }} | |
steps: | |
- uses: actions/checkout@v4.2.0 | |
- name: Bump version and push tag | |
id: tag | |
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }} | |
uses: ArloL/calver-tag-action@v2410.0.102 | |
- id: output | |
env: | |
NEW_VERSION: ${{ steps.tag.outputs.new_version }} | |
run: | | |
echo "new_version=${NEW_VERSION:-$GITHUB_SHA}" >> $GITHUB_OUTPUT | |
echo "build_timestamp=$(date --iso-8601=seconds)" >> $GITHUB_OUTPUT | |
- name: Make sure build did not change anything | |
run: git diff --exit-code | |
macos: | |
runs-on: macos-latest | |
needs: version | |
env: | |
REVISION: ${{ needs.version.outputs.new_version }} | |
BUILD_TIMESTAMP: ${{ needs.version.outputs.build_timestamp }} | |
steps: | |
- uses: actions/checkout@v4.2.0 | |
- uses: graalvm/setup-graalvm@v1.2.5 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: graalvm | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cache: 'maven' | |
- name: Build with Maven | |
run: | | |
set -o xtrace | |
./mvnw \ | |
--batch-mode \ | |
-Dsha1="${GITHUB_SHA}" \ | |
-Drevision="${REVISION}" \ | |
verify | |
- name: Test executable | |
run: sh ./src/test/native/test-executable.sh "${{ env.ARTIFACT }}" macos "${{ env.REVISION }}" | |
- name: Move artifacts | |
run: | | |
mkdir target/artifacts | |
cp target/${{ env.ARTIFACT }}-* target/artifacts | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: ${{ env.ARTIFACT }}-${{ github.job }}-${{ needs.version.outputs.new_version }} | |
path: target/artifacts | |
- name: Make sure build did not change anything | |
run: git diff --exit-code | |
linux: | |
runs-on: ubuntu-latest | |
needs: version | |
env: | |
REVISION: ${{ needs.version.outputs.new_version }} | |
BUILD_TIMESTAMP: ${{ needs.version.outputs.build_timestamp }} | |
steps: | |
- uses: actions/checkout@v4.2.0 | |
- uses: graalvm/setup-graalvm@v1.2.5 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: graalvm | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cache: 'maven' | |
- name: Build with Maven | |
run: | | |
set -o xtrace | |
./mvnw \ | |
--batch-mode \ | |
-Dsha1="${GITHUB_SHA}" \ | |
-Drevision="${REVISION}" \ | |
verify | |
- name: Test executable | |
run: sh ./src/test/native/test-executable.sh "${{ env.ARTIFACT }}" linux "${{ env.REVISION }}" | |
- name: Move artifacts | |
run: | | |
mkdir target/artifacts | |
cp target/${{ env.ARTIFACT }}-* target/artifacts | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: ${{ env.ARTIFACT }}-${{ github.job }}-${{ needs.version.outputs.new_version }} | |
path: target/artifacts | |
- name: Make sure build did not change anything | |
run: git diff --exit-code | |
windows: | |
runs-on: windows-latest | |
needs: version | |
env: | |
REVISION: ${{ needs.version.outputs.new_version }} | |
BUILD_TIMESTAMP: ${{ needs.version.outputs.build_timestamp }} | |
steps: | |
- uses: actions/checkout@v4.2.0 | |
- uses: graalvm/setup-graalvm@v1.2.5 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: graalvm | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cache: 'maven' | |
- name: Remove WindowsImageHeapProviderFeature | |
run: '& 7z d "$env:JAVA_HOME\lib\svm\builder\svm.jar" com/oracle/svm/core/windows/WindowsImageHeapProviderFeature.class' | |
- name: Build with Maven | |
run: | | |
.\mvnw --batch-mode -Dsha1="$env:GITHUB_SHA" -Drevision="$env:REVISION" verify | |
- name: Test executable | |
run: sh ./src/test/native/test-executable.sh "${{ env.ARTIFACT }}" windows "${{ env.REVISION }}" | |
- name: Move artifacts | |
run: | | |
mkdir target/artifacts | |
copy target/${{ env.ARTIFACT }}-* target/artifacts | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: ${{ env.ARTIFACT }}-${{ github.job }}-${{ needs.version.outputs.new_version }} | |
path: target/artifacts | |
- name: Make sure build did not change anything | |
run: git diff --exit-code | |
release: | |
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
needs: [version, macos, linux, windows] | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4.2.0 | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v4.1.8 | |
with: | |
path: ./target | |
- name: Build project | |
working-directory: target | |
run: | | |
zip -r windows.zip ${{ env.ARTIFACT }}-windows-${{ needs.version.outputs.new_version }}/ | |
zip -r linux.zip ${{ env.ARTIFACT }}-linux-${{ needs.version.outputs.new_version }}/ | |
zip -r macos.zip ${{ env.ARTIFACT }}-macos-${{ needs.version.outputs.new_version }}/ | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/release-action@v1.14.0 | |
with: | |
tag: v${{ needs.version.outputs.new_version }} | |
name: Release ${{ needs.version.outputs.new_version }} | |
body: ${{ needs.version.outputs.changelog }} | |
draft: true | |
- name: Upload Release Asset | |
uses: shogo82148/actions-upload-release-asset@v1.7.8 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/linux.zip | |
asset_name: ${{ env.ARTIFACT }}-linux-${{ needs.version.outputs.new_version }}.zip | |
asset_content_type: application/zip | |
- name: Upload Release Asset | |
uses: shogo82148/actions-upload-release-asset@v1.7.8 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/${{ env.ARTIFACT }}-linux-${{ needs.version.outputs.new_version }}/${{ env.ARTIFACT }}-linux-${{ needs.version.outputs.new_version }} | |
asset_name: ${{ env.ARTIFACT }}-linux | |
asset_content_type: application/x-executable | |
- name: Upload Release Asset | |
uses: shogo82148/actions-upload-release-asset@v1.7.8 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/windows.zip | |
asset_name: ${{ env.ARTIFACT }}-windows-${{ needs.version.outputs.new_version }}.zip | |
asset_content_type: application/zip | |
- name: Upload Release Asset | |
uses: shogo82148/actions-upload-release-asset@v1.7.8 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/${{ env.ARTIFACT }}-windows-${{ needs.version.outputs.new_version }}/${{ env.ARTIFACT }}-windows-${{ needs.version.outputs.new_version }}.exe | |
asset_name: ${{ env.ARTIFACT }}-windows.exe | |
asset_content_type: application/vnd.microsoft.portable-executable | |
- name: Upload Release Asset | |
uses: shogo82148/actions-upload-release-asset@v1.7.8 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/macos.zip | |
asset_name: ${{ env.ARTIFACT }}-macos-${{ needs.version.outputs.new_version }}.zip | |
asset_content_type: application/zip | |
- name: Upload Release Asset | |
uses: shogo82148/actions-upload-release-asset@v1.7.8 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/${{ env.ARTIFACT }}-macos-${{ needs.version.outputs.new_version }}/${{ env.ARTIFACT }}-macos-${{ needs.version.outputs.new_version }} | |
asset_name: ${{ env.ARTIFACT }}-macos | |
asset_content_type: application/octet-stream | |
- uses: eregon/publish-release@v1.0.6 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ steps.create_release.outputs.id }} | |
- name: Make sure build did not change anything | |
run: git diff --exit-code | |
deploy: | |
needs: [version, macos, linux, windows] | |
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/dependabot/') }} | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4.2.0 | |
- uses: actions/setup-java@v4.5.0 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: temurin | |
cache: 'maven' | |
- name: Publish to GitHub Packages Apache Maven | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REVISION: ${{ needs.version.outputs.new_version }} | |
BUILD_TIMESTAMP: ${{ needs.version.outputs.build_timestamp }} | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
-Dsha1="${GITHUB_SHA}" \ | |
-Drevision="${REVISION}" \ | |
-DaltDeploymentRepository="github::default::https://maven.pkg.github.com/${GITHUB_REPOSITORY}" \ | |
deploy | |
- name: Make sure build did not change anything | |
run: git diff --exit-code |