Skip to content

chore(release): prepare remote base for version 1.0.40 #1292

chore(release): prepare remote base for version 1.0.40

chore(release): prepare remote base for version 1.0.40 #1292

Workflow file for this run

name: Java CI
# This workflow builds and tests the Operator with Gradle.
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Set up JDK
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: Test with Gradle
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
retry_wait_seconds: 10
warning_on_retry: true
command: ./gradlew --continue check jacocoTestReport -x spotlessCheck
- name: Ensure distroless
run: >
./gradlew jibDockerBuild &&
docker run --rm --entrypoint="echo" mongodb-operator:latest 'image is not distroless' && exit 1 || echo 'image is distroless'
- uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5
if: always()
with:
name: java-ci-test-results
path: |
build/reports/
build/test-results/**/*.xml
build/classes/
retention-days: 7
publish-test-results:
timeout-minutes: 60
needs: build
runs-on: ubuntu-latest
# Don't run for forks and dependabot because of missing secrets
if: (success() || failure()) && !(github.event.pull_request && github.event.pull_request.head.repo.fork) && github.actor != 'dependabot[bot]'
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@567cc7f8dcea3eba5da355f6ebc95663310d8a07
with:
files: artifacts/**/test-results/**/*.xml
# create release and publish the artifacts
semantic-release:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: build
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
token: ${{ secrets.GH_RELEASE_TOKEN }} # can't use standard GITHUB_TOKEN
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 14
# Do we really need to set up Java here?
- name: Set up JDK
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: Install Semantic release
run: |
sudo npm install -g \
semantic-release@18.0.0 \
@semantic-release/git@10.0.0 \
@semantic-release/release-notes-generator@10.0.2 \
@semantic-release/github@8.0.0 \
@semantic-release/exec@6.0.3
- name: Release and Publish
run: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }} # can't use standard GITHUB_TOKEN