Skip to content

Commit

Permalink
Testing #5780
Browse files Browse the repository at this point in the history
  • Loading branch information
StepanBrychta committed Oct 1, 2024
1 parent 7049f92 commit f978728
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: "Create release and publish packages to Sonatype"

on:
push:
branches:
- main
on: push

#on:
# push:
# branches:
# - main

permissions:
id-token: write
Expand Down Expand Up @@ -133,13 +135,5 @@ jobs:
ARTIFACT_NAME="${{ matrix.service }}_2.12"
NEW_VERSION="${{needs.create-release.outputs.new-version}}"
SONATYPE_RESPONSE=$(curl "https://central.sonatype.com/solrsearch/select?q=g:org.wellcomecollection%20a:$ARTIFACT_NAME%20v:$NEW_VERSION")
ARTIFACT_COUNT=$(echo SONATYPE_RESPONSE | jq '.response | .numFound')
if [[ "ARTIFACT_COUNT" -eq 0 ]]; then
echo "Publishing package $ARTIFACT_NAME, version $NEW_VERSION to Sonatype."
PGP_PASSPHRASE=${{ secrets.GPG_PASSPHRASE }} sbt "project ${{ matrix.service }}" publishSigned
sbt "project ${{ matrix.service }}" sonatypeBundleRelease
else
echo "Package $ARTIFACT_NAME, version $NEW_VERSION already exists in Sonatype. Exiting."
fi
SONATYPE_RESPONSE=$(curl -s "https://central.sonatype.com/solrsearch/select?q=g:org.wellcomecollection%20a:$ARTIFACT_NAME%20v:$NEW_VERSION")
ARTIFACT_COUNT=$(echo $SONATYPE_RESPONSE | jq '.response | .numFound')
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RELEASE_TYPE: minor

Just testing.

0 comments on commit f978728

Please sign in to comment.