Repository navigation
Publish releases to maven.stirlingpdf.com #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
12e61c9
Publish to the Stirling Maven repo on R2
Frooodle ddd0b36
Release through staging on maven.stirlingpdf.com and point docs and r…
Frooodle f28e544
Take the released version from the publish job
Frooodle 1f13352
Record the move to maven.stirlingpdf.com in the changelog
Frooodle 157e89e
Merge remote-tracking branch 'upstream/main' into HEAD
balazs-szucs 9baa723
Merge remote-tracking branch 'upstream/main' into HEAD
balazs-szucs 0d444a9
Merge main into publish-to-r2
Frooodle 7639e8f
Mirror each release to Maven Central without blocking the R2 release
Frooodle 8e55232
Copy the latest Central releases to a chosen R2 destination in one run
Frooodle fa0d937
Publish through the shared maven-r2-publish actions
Frooodle 4931c38
Label the maven-r2-publish pins with v1.0.0
Frooodle 1208bd5
Merge remote-tracking branch 'origin/main' into publish-to-r2
Frooodle 99195c7
Validate the release version, keep staging on failure and attach CLI …
Frooodle 4ca0a74
Harden the Central and CLI release jobs and refuse smoke for pre-1.1 …
Frooodle e033fdb
Merge branch 'main' into publish-to-r2
Frooodle 8311b04
Merge main into publish-to-r2
Frooodle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| name: Copy Central releases to maven.stirlingpdf.com | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| versions: | ||
| description: 'Versions to copy: all, or a list such as 1.2.0,1.3.0' | ||
| required: true | ||
| default: 'all' | ||
| latest: | ||
| description: 'With all, copy only this many of the newest versions (smoke needs 1.1.0 or newer)' | ||
| required: false | ||
| default: '5' | ||
| destination: | ||
| description: 'Bucket prefix to copy to, e.g. staging/mirror-test/. Empty is the live repo root.' | ||
| required: false | ||
| default: '' | ||
| smoke: | ||
| description: 'Also run the six-platform smoke against each copied version' | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
| dryRun: | ||
| description: 'Only list what would be copied' | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| copy: | ||
| name: Copy from Maven Central | ||
| runs-on: ubuntu-latest | ||
| environment: maven | ||
| concurrency: | ||
| group: stirling-maven | ||
| cancel-in-progress: false | ||
| outputs: | ||
| versions: ${{ steps.mirror.outputs.versions }} | ||
| url: ${{ steps.mirror.outputs.url }} | ||
| steps: | ||
| - name: Refuse smoke for releases older than its artifact set | ||
| if: ${{ inputs.smoke && inputs.versions != 'all' }} | ||
| env: | ||
| VERSIONS: ${{ inputs.versions }} | ||
| run: | | ||
| for v in $(echo "$VERSIONS" | tr -s ', ' '\n'); do | ||
| if [ "$(printf '%s\n1.1.0\n' "$v" | sort -V | head -1)" != 1.1.0 ]; then | ||
| echo "ERROR: smoke expects the jpdfium-vips modules added in 1.1.0; $v predates them. Copy it without smoke." | ||
| exit 1 | ||
| fi | ||
| done | ||
|
|
||
| - id: mirror | ||
| uses: Stirling-Tools/maven-r2-publish/mirror@137b6b342d035155657660adf93da370b518ed8d # main | ||
| with: | ||
| group: com.stirling | ||
| artifact: jpdfium | ||
| versions: ${{ inputs.versions }} | ||
| latest: ${{ inputs.latest }} | ||
| destination: ${{ inputs.destination }} | ||
| dry-run: ${{ inputs.dryRun }} | ||
| endpoint: ${{ secrets.R2_ENDPOINT }} | ||
| access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | ||
| secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | ||
| bucket: ${{ vars.R2_BUCKET || 'stirling-maven' }} | ||
|
|
||
| smoke: | ||
| name: Smoke ${{ matrix.version }} (${{ matrix.platform }}) | ||
| needs: copy | ||
| if: ${{ inputs.smoke && !inputs.dryRun && needs.copy.outputs.versions != '[]' }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ${{ fromJSON(needs.copy.outputs.versions) }} | ||
| platform: [linux-x64, linux-arm64, darwin-x64, darwin-arm64, windows-x64, windows-arm64] | ||
| include: | ||
| - { platform: linux-x64, runner: ubuntu-24.04 } | ||
| - { platform: linux-arm64, runner: ubuntu-24.04-arm } | ||
| - { platform: darwin-x64, runner: macos-15-intel } | ||
| - { platform: darwin-arm64, runner: macos-15 } | ||
| - { platform: windows-x64, runner: windows-latest } | ||
| - { platform: windows-arm64, runner: windows-11-arm } | ||
| runs-on: ${{ matrix.runner }} | ||
| steps: | ||
| - uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v7.0.1 | ||
|
|
||
| - uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v5.7.0 | ||
| with: | ||
| distribution: ${{ matrix.platform == 'windows-arm64' && 'microsoft' || 'temurin' }} | ||
| java-version: '25' | ||
|
|
||
| - name: Verify every artifact and run the smoke | ||
| shell: bash | ||
| env: | ||
| MODE: r2 | ||
| R2_REPO_URL: ${{ needs.copy.outputs.url }} | ||
| VERSION: ${{ matrix.version }} | ||
| PLATFORM: ${{ matrix.platform }} | ||
| run: bash .github/scripts/verify-central.sh | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.