Skip to content
Open
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
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release

on:
workflow_dispatch:
inputs:
release-version:
description: 'Version to release, e.g. 5.19.0.RELEASE'
type: string
required: true
snapshot-version:
description: 'Next development version, e.g. 5.20.0.BUILD-SNAPSHOT'
type: string
required: true

permissions:
contents: write

concurrency:
group: release
cancel-in-progress: false

jobs:
release:
if: ${{ github.repository == 'cloudfoundry/cf-java-client' && (github.ref == 'refs/heads/5.x.x' || github.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
RELEASE_BRANCH: ${{ github.ref_name }}
RELEASE_VERSION: ${{ inputs.release-version }}
SNAPSHOT_VERSION: ${{ inputs.snapshot-version }}
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Set up Java
uses: actions/setup-java@v6
with:
distribution: liberica
java-version: 8
cache: maven
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Leaves HEAD on the snapshot commit and the v<release> tag on the release commit.
- name: Create release and snapshot commits
run: ci/create-release.sh "$RELEASE_VERSION" "$SNAPSHOT_VERSION"
- name: Deploy to Maven Central
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: |
git checkout --quiet "v$RELEASE_VERSION"
./mvnw --batch-mode -Dmaven.test.skip=true deploy
git checkout --quiet -
- name: Push development version and tag
run: git push origin "HEAD:$RELEASE_BRANCH" "v$RELEASE_VERSION"
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "v$RELEASE_VERSION" --title "v$RELEASE_VERSION" --generate-notes
18 changes: 0 additions & 18 deletions ci/Dockerfile

This file was deleted.

87 changes: 0 additions & 87 deletions ci/claim-environment.sh

This file was deleted.

31 changes: 0 additions & 31 deletions ci/deploy.sh

This file was deleted.

38 changes: 0 additions & 38 deletions ci/integration-test.sh

This file was deleted.

9 changes: 0 additions & 9 deletions ci/promote-to-maven-central.sh

This file was deleted.

27 changes: 0 additions & 27 deletions ci/tcp-routes.yml

This file was deleted.

17 changes: 0 additions & 17 deletions ci/unclaim-environment.sh

This file was deleted.

8 changes: 0 additions & 8 deletions ci/unit-test.sh

This file was deleted.

31 changes: 9 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,28 +244,15 @@

<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.7.0</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USERNAME}}</username>
<password>{{ARTIFACTORY_PASSWORD}}</password>
<repoKey>{{ARTIFACTORY_REPO_KEY|"libs-release-local"}}</repoKey>
<snapshotRepoKey>{{ARTIFACTORY_SNAPSHOT_REPO_KEY|"libs-snapshot-local"}}</snapshotRepoKey>
<excludePatterns>*-tests.jar</excludePatterns>
</publisher>
</configuration>
</execution>
</executions>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Loading