Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-XX:-TieredCompilation -XX:TieredStopAtLevel=1
138 changes: 103 additions & 35 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,38 @@ name: Deploy a branch
on:
workflow_dispatch:
inputs:

deploy-artifacts-to-gh-packages:
description: "Deploy artifacts to GH Packages"
dry-run:
description: "Dry run the deployment"
default: true
type: boolean

deploy-javadoc-to-gh-pages:
description: "Deploy JavaDocs to GH Pages"
default: true
skip-scm:
description: "Skip tagging and release version update commits"
default: false
type: boolean

jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
skip-dependency-scan:
description: "Skip dependency scan"
default: false
type: boolean

github:
name: "Deploy to GitHub"
needs: [build]
skip-tests:
description: "Skip tests"
default: false
type: boolean

version:
description: "Version (leave blank to release non-SNAPSHOT patch)"
default: ""
type: string

jobs:
maven-central:
name: "Maven Central"
runs-on: ubuntu-22.04

permissions:
contents: read
packages: write
pages: write
contents: write
id-token: write

steps:
Expand All @@ -36,38 +43,99 @@ jobs:
with:
fetch-depth: 2

- name: Initialize JDK
- name: Initialize Java environment
uses: actions/setup-java@v3
with:
distribution: zulu
# Must use >= JDK 17 for Javadocs to generate correctly.
java-version: 17
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-passphrase: GPG_PASSPHRASE
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Configure Git
shell: bash
run: |-
source ./scripts/common.sh

info "Applying Git user configuration"
run <<SCRIPT
git config user.name '${{ github.actor }}'
git config user.email '${{ github.actor }}@users.noreply.github.com'
SCRIPT

- name: Build artifacts and deploy to GitHub packages
run: >-
./mvnw
-B
-e
-T4
-Dmaven.deploy.skip=${{ ! inputs.deploy-artifacts-to-gh-packages }}
-Dmaven.source.includePom=true
-Dmaven.test.skip=true
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-Dstyle.color=always
--also-make
--no-transfer-progress
--projects java-compiler-testing
clean install javadoc:jar source:jar deploy
- name: Perform release to Maven Central
shell: bash
run: |-
source ./scripts/common.sh

info "Determining release version to use (this may take a moment)..."
if [ '${{ inputs.version }}' == "" ]; then
release_version="$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//g')"
else
release_version='${{ inputs.version }}'
fi

success "Will use version ${release_version} for this release"

info "Preparing and performing the release"
ensure-set OSSRH_USERNAME OSSRH_TOKEN GPG_PASSPHRASE

build_args=()
if [[ '${{ inputs.skip-dependency-check }}' = 'false' ]]; then
build_args+=("-P" "dependency-check")
fi
if [[ '${{ inputs.skip-tests }}' = 'true' ]]; then
build_args+=("-Dmaven.test.skip" "-DskipTests")
fi

build_goals=()
if [[ '${{ inputs.skip-scm }}' = 'true' ]]; then
build_goals+=("release:update-versions")
else
build_goals+=("release:prepare")
fi
build_goals+=("release:perform")

run <<-SCRIPT
./mvnw -B -e \
-P release \
--no-transfer-progress \
-Darguments='${build_args[@]}' \
-DdryRun='${{ inputs.dry-run }}' \
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \
-Dpassword='${{ secrets.GITHUB_TOKEN }}' \
-DreleaseVersion='${release_version}' \
-DsignTag=false \
-Dstyle.color=always \
-Dtag='v${release_version}' \
${build_goals[@]}
SCRIPT

success "Release has been performed successfully"
env:
GITHUB_TOKEN: ${{ github.token }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Upload JavaDocs as a build artifact
if: ${{ inputs.deploy-javadoc-to-gh-pages }}
uses: actions/upload-pages-artifact@v1
with:
path: java-compiler-testing/target/apidocs

javadocs:
name: "JavaDocs (GitHub Pages)"
runs-on: ubuntu-22.04
needs:
- maven-central
permissions:
pages: write
id-token: write

steps:
- name: Deploy JavaDocs build artifact to GitHub Pages
if: ${{ inputs.deploy-javadoc-to-gh-pages }}
if: ${{ ! inputs.dry-run }}
id: deployment
uses: actions/deploy-pages@v1
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ target/
.classpath

# Maven
pom.xml.versionsBackup
pom.xml.next
pom.xml.releaseBackup
pom.xml.tag
pom.xml.versionsBackup
release.properties
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-avaje-inject/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-avaje-jsonb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-checkerframework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-dagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-error-prone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-google-auto-factory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-google-auto-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-google-auto-value/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-immutables/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-lombok/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 2 additions & 4 deletions acceptance-tests/acceptance-tests-manifold-systems/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.ascopes.jct</groupId>
<artifactId>acceptance-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.1-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Loading