Skip to content

Commit 329c7eb

Browse files
committed
Add central sync to ga workflow
- Relates #454
1 parent 643b189 commit 329c7eb

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-1
lines changed

.github/release-files-spec.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"files": [
3+
{
4+
"aql": {
5+
"items.find": {
6+
"$and": [
7+
{
8+
"@build.name": "${buildname}",
9+
"@build.number": "${buildnumber}",
10+
"path": {"$match": "org*"}
11+
},
12+
{
13+
"$or": [
14+
{
15+
"name": {"$match": "*.pom"}
16+
},
17+
{
18+
"name": {"$match": "*.jar"}
19+
}
20+
]
21+
}
22+
]
23+
}
24+
},
25+
"target": "nexus/"
26+
}
27+
]
28+
}

.github/workflows/release-ga.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
maven-version: 3.8.4
1919
- uses: jfrog/setup-jfrog-cli@v1
2020
with:
21-
version: 1.46.4
21+
version: 1.50.0
2222
env:
2323
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
2424
- name: Configure JFrog Cli
@@ -147,3 +147,38 @@ jobs:
147147
--draft \
148148
--title "$PROJECT_VERSION" \
149149
--notes-file $RELEASE_NOTES_FILE
150+
151+
central:
152+
runs-on: ubuntu-latest
153+
needs: ghrelease
154+
environment: central
155+
steps:
156+
- uses: actions/checkout@v2
157+
- uses: jfrog/setup-jfrog-cli@v1
158+
with:
159+
version: 1.50.0
160+
env:
161+
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
162+
- name: Configure JFrog Cli
163+
run: |
164+
echo JFROG_CLI_BUILD_NAME=spring-shell-main-release >> $GITHUB_ENV
165+
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
166+
- name: Download Release Files
167+
run: |
168+
jfrog rt download \
169+
--spec .github/release-files-spec.json \
170+
--spec-vars "buildname=$JFROG_CLI_BUILD_NAME;buildnumber=$JFROG_CLI_BUILD_NUMBER"
171+
- uses: jvalkeal/nexus-sync@v0
172+
with:
173+
url: ${{ secrets.OSSRH_URL }}
174+
username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
175+
password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
176+
staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
177+
create: true
178+
upload: true
179+
close: true
180+
release: true
181+
generate-checksums: true
182+
pgp-sign: true
183+
pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }}
184+
pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

0 commit comments

Comments
 (0)