-
Notifications
You must be signed in to change notification settings - Fork 227
Release updates #365
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
Release updates #365
Changes from all commits
581ef65
df4a4a1
a5c8e7b
9ba6a8f
2e32163
d978432
cd23da8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| java: [ '11', '17', '21', '25' ] | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Java | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| java-version: ${{ matrix.java }} | ||
| distribution: 'zulu' | ||
| cache: maven | ||
|
|
||
| - name: Build | ||
| run: ./mvnw -ntp -B verify |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Version to release (e.g. 1.0.0)' | ||
| required: true | ||
| type: string | ||
| next_version: | ||
| description: 'Next development version (e.g. 1.0.1-SNAPSHOT)' | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| id-token: write | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up JDK | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: zulu | ||
| java-version: 11 | ||
| cache: maven | ||
|
|
||
| - name: Set version | ||
| run: | | ||
| # Configure git for any operations | ||
| git config --global user.name "GitHub Actions" | ||
| git config --global user.email "actions@github.com" | ||
| # Check if we already have the release commit | ||
| if git log --oneline -10 | grep -q "Release version ${{ github.event.inputs.version }}"; then | ||
| echo "Release commit already exists, skipping version setting" | ||
| elif [ "$CURRENT_VERSION" != "${{ github.event.inputs.version }}" ]; then | ||
| echo "Setting version to ${{ github.event.inputs.version }}" | ||
| mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.version }} | ||
| git add pom.xml "**/pom.xml" | ||
| git commit -m "Release version ${{ github.event.inputs.version }}" | ||
| git push origin main | ||
| else | ||
| echo "Version is already set to ${{ github.event.inputs.version }}" | ||
| fi | ||
| - name: Build | ||
| run: ./mvnw -Ppublication | ||
|
|
||
| - name: Release | ||
| env: | ||
| JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
| JRELEASER_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
| JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
| JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
| JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} | ||
| run: ./mvnw -N -Ppublication jreleaser:full-release | ||
|
|
||
| - name: Set next version | ||
| if: github.event_name == 'workflow_dispatch' | ||
| run: | | ||
| # Configure git (in case it's needed again) | ||
| git config --global user.name "GitHub Actions" | ||
| git config --global user.email "actions@github.com" | ||
| echo "Setting next version to ${{ github.event.inputs.next_version }}" | ||
| mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.next_version }} | ||
| git add pom.xml "**/pom.xml" | ||
| git commit -m "Prepare for next development version" | ||
| git push origin main | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,6 @@ | |
| target | ||
| .classpath | ||
| .project | ||
| .settings | ||
| .settings | ||
| .idea | ||
| out | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| wrapperVersion=3.3.4 | ||
| distributionType=only-script | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,27 +3,24 @@ | |
| <artifactId>java10-shim</artifactId> | ||
| <packaging>jar</packaging> | ||
| <parent> | ||
| <relativePath>..</relativePath> | ||
| <groupId>com.googlecode.owasp-java-html-sanitizer</groupId> | ||
| <artifactId>parent</artifactId> | ||
| <version>20240325.2-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <name>Java 10 Shim</name> | ||
| <url>https://github.com/OWASP/java-html-sanitizer</url> | ||
| <description> | ||
| Provides an implementation of java8-shim that interoperates with | ||
| Java >= 10 idioms for immutable collections. | ||
| </description> | ||
|
|
||
| <properties> | ||
| <maven.compiler.release>10</maven.compiler.release> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this 10, rather than 11 as per the strategy clause? Or is this just a quick fix to get this release out and prove out the pipeline, and this will moved to 11 on the next release?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was previously set to 10, I just moved configuration around but didn't change release values as that technically constitutes a bump in major compat. We can review this setting along with dependencies for the next release after the current one to get the CVE fix out the door.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's what I thought - thanks for confirming & I think this is GTG. 🚢 in my opinion!
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #364 needs to be merged first |
||
| </properties> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <configuration> | ||
| <release>10</release> | ||
| </configuration> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-release-plugin</artifactId> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double-checking, but the plan is that we'll build on JDK 11 with source & target set to 8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct, there are 2 artifacts built with release 8: empirism and java8-shim. The rest use release 10 as before.