Skip to content

Commit 49a5922

Browse files
committed
Merge branch 'v1'
2 parents 4335730 + d7f6175 commit 49a5922

File tree

2 files changed

+15
-42
lines changed

2 files changed

+15
-42
lines changed

.github/workflows/deploy-artifacts.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,48 +77,45 @@ jobs:
7777
if [[ "$deploy_location" = "true" ]] ; then
7878
if [[ "$VERSION" =~ "-SNAPSHOT" ]] ; then
7979
# always default -SNAPSHOT to artifactory
80-
deploy_location=artifactory
80+
deploy_location=libs-snapshot-local
8181
elif [[ "$DEFAULT_PUBLISH_MILESTONE_CENTRAL" = "true" ]] ; then
8282
# if configured, non -SNAPSHOT go to central
8383
deploy_location=central
8484
elif [[ "$VERSION" =~ "-" ]] ; then
8585
# -M\d+, and -RC\d+ all go to artifactory by default to remain passive
8686
# Newer generations will only deploy -SNAPSHOT to artifactory, but they must specify default-publish-milestone-central=true
87-
deploy_location=artifactory
87+
deploy_location=libs-milestone-local
8888
else
8989
deploy_location=central
9090
fi
9191
fi
9292
echo "deploy_location=$deploy_location" >> $GITHUB_OUTPUT
93-
- name: Deploy to Artifactory
94-
if: ${{ steps.deploy-location.outputs.deploy_location == 'artifactory' }}
95-
env:
96-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
97-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
98-
ARTIFACTORY_BUILD_NAME: ${{ github.event.repository.name }}-${{ steps.branch-name.outputs.branch }}
99-
ARTIFACTORY_BUILD_NUMBER: ${{ github.run_id }}
100-
ARTIFACTORY_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
101-
ARTIFACTORY_USER_AGENT_NAME: GitHub Actions
102-
ARTIFACTORY_USER_AGENT_VERSION: Unknown
103-
ARTIFACTORY_VCS_REVISION: ${{ github.sha }}
104-
run: ./gradlew artifactoryPublish -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace
10593
- name: Stage Local Artifacts for Publishing to Central
106-
if: ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
10794
env:
10895
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
10996
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
11097
run: |
11198
./gradlew publishAllPublicationsToLocalRepository --stacktrace
112-
# rm checksums to work around https://github.com/spring-io/central-publish-action/issues/11
113-
find -name "*.md5" | xargs rm -f
114-
find -name "*.sha*" | xargs rm -f
99+
- name: Deploy to Artifactory
100+
if: ${{ steps.deploy-location.outputs.deploy_location != 'artifactory' }}
101+
uses: spring-io/[email protected]
102+
with:
103+
uri: "https://repo.spring.io"
104+
repository: ${{ steps.deploy-location.outputs.deploy_location }}
105+
build-name: ${{ github.event.repository.name }}-${{ steps.branch-name.outputs.branch }}
106+
build-uri: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
107+
username: ${{ secrets.ARTIFACTORY_USERNAME }}
108+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
109+
vcs-revision: ${{ github.sha }}
110+
folder: build/publications/repos
115111
- name: Publish Staged Artifacts to Central
116112
if: ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
117113
uses: spring-io/[email protected]
118114
with:
119115
token-name: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
120116
token: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
121117
dir: build/publications/repos
118+
fail-on-existing-checksums: false
122119
- id: artifacts-deployed
123120
name: Artifacts Deployed
124121
run: echo "result=true" >> $GITHUB_OUTPUT

.github/workflows/perform-release.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -81,30 +81,6 @@ jobs:
8181
- id: has-oss-support
8282
name: Check OSS Support (for current branch)
8383
run: echo "result=$(./gradlew -q checkBranchHasOssSupport -Pbranch=$BRANCH -PgitHubAccessToken=$TOKEN)" >> $GITHUB_OUTPUT
84-
- name: Wait for Milestone Artifacts
85-
if: ${{ contains(inputs.project-version, '-RC') || contains(inputs.project-version, '-M') }}
86-
env:
87-
VERSION: ${{ inputs.project-version }}
88-
run: |
89-
echo "Wait for artifacts of $REPO@$VERSION to appear on milestone repository ($MILESTONE_REPO)."
90-
until curl -f -s $MILESTONE_REPO/$ARTIFACT_PATH/$VERSION/ > /dev/null
91-
do
92-
sleep 30
93-
echo "."
94-
done
95-
echo "Artifacts for $REPO@$VERSION have been released to milestone repository ($MILESTONE_REPO)."
96-
- name: Wait for Release Artifacts
97-
if: ${{ !contains(inputs.project-version, '-RC') && !contains(inputs.project-version, '-M') }}
98-
env:
99-
VERSION: ${{ inputs.project-version }}
100-
run: |
101-
echo "Wait for artifacts of $REPO@$VERSION to appear on release repository ($RELEASE_REPO)."
102-
until curl -f -s $RELEASE_REPO/$ARTIFACT_PATH/$VERSION/ > /dev/null
103-
do
104-
sleep 30
105-
echo "."
106-
done
107-
echo "Artifacts for $REPO@$VERSION have been released to release repository ($RELEASE_REPO)."
10884
- name: Create GitHub Release
10985
env:
11086
VERSION: ${{ inputs.project-version }}

0 commit comments

Comments
 (0)