diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f7a30c0c7..d3a2cb46c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,8 +89,7 @@ jobs: name: Release JARs runs-on: ubuntu-latest permissions: - contents: write - pull-requests: write + contents: read packages: write steps: - name: Checkout code @@ -104,19 +103,20 @@ jobs: with: java-version: "11" distribution: "temurin" - - name: Publish JARs + server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin + server-username: OSSRH_USERNAME + server-password: OSSRH_PASSWORD + gpg-passphrase: SIGN_KEY_PASS + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + cache: 'maven' + - name: Publish JARs # release JARs to central run: | - git config user.name github-actions - git config user.email github-actions@github.com - mvn release:clean release:prepare release:perform \ - --batch-mode \ - -DreleaseVersion=$(git describe --tags --abbrev=0 | cut -c2-) \ - -Dtag=$(git describe --tags --abbrev=0) \ - -Dsonatype.username=${{ secrets.SONATYPE_USERNAME }} \ - -Dsonatype.password=${{ secrets.SONATYPE_PASSWORD }} \ - -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \ - -DserverId=ossrh + mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false + mvn -U --batch-mode clean deploy -P release env: + SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }} + OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} GITHUB_TOKEN: ${{ github.token }} create-release: name: Release Go Binaries diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml new file mode 100644 index 0000000000..7b0c73f2c6 --- /dev/null +++ b/.github/workflows/snapshots.yml @@ -0,0 +1,39 @@ +on: + push: + branches: + - main +name: Publish Snapshots +jobs: + release-jars: + name: Release JARs + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Init Hermit + uses: cashapp/activate-hermit@v1 + # Ideally we'd use Hermit's JDK, but this action creates the correct settings.xml for us. + - uses: actions/setup-java@v3 + with: + java-version: "11" + distribution: "temurin" + server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin + server-username: OSSRH_USERNAME + server-password: OSSRH_PASSWORD + gpg-passphrase: SIGN_KEY_PASS + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + cache: 'maven' + - name: Publish Snapshot JARs + run: | + mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-)-SNAPSHOT -DprocessAllModules -DgenerateBackupPoms=false + mvn -U --batch-mode clean deploy -P snapshot + env: + SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }} + OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/kotlin-runtime/ftl-generator/pom.xml b/kotlin-runtime/ftl-generator/pom.xml index cd99df202c..41bae2619a 100644 --- a/kotlin-runtime/ftl-generator/pom.xml +++ b/kotlin-runtime/ftl-generator/pom.xml @@ -89,15 +89,4 @@ - - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - diff --git a/kotlin-runtime/ftl-runtime/pom.xml b/kotlin-runtime/ftl-runtime/pom.xml index 7b97e59e8c..0430f47033 100644 --- a/kotlin-runtime/ftl-runtime/pom.xml +++ b/kotlin-runtime/ftl-runtime/pom.xml @@ -96,15 +96,4 @@ - - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 405fbc0b37..9f54e7f97c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,19 @@ 1.0-SNAPSHOT pom + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + scm:git:git://github.com/TBD54566975/ftl.git + scm:git:ssh://github.com/TBD54566975/ftl.git + https://github.com/TBD54566975/ftl/tree/main + + kotlin-runtime/ftl-runtime kotlin-runtime/ftl-generator @@ -121,10 +134,6 @@ - - scm:git:https://github.com/TBD54566975/ftl.git - - @@ -270,37 +279,30 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - ossrh - https://s01.oss.sonatype.org/ - true - - - - org.apache.maven.plugins - maven-release-plugin - 3.0.1 - - true - false - release - deploy - - + release + + kotlin-runtime/ftl-runtime + kotlin-runtime/ftl-generator + + + org.apache.maven.plugins + maven-release-plugin + 3.0.1 + + true + release,release-profile + deploy + + org.apache.maven.plugins maven-gpg-plugin @@ -313,14 +315,68 @@ sign - 0x088BCD86 - gpg.passphrase + + --pinentry-mode + loopback + --keyserver + hkp://keys.openpgp.org/ + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.6.2 + true + + + attach-javadocs + + jar + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + ${maven.deploy.skip} + ossrh + https://s01.oss.sonatype.org/ + true + + + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + \ No newline at end of file