Skip to content

Commit

Permalink
Maybe this will allow multiple lines going to GITHUB_OUTPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
Guardian Automated Maven Release committed Dec 3, 2023
1 parent df98fb2 commit f07ea02
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/isolated-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
key_fingerprint=$(echo $key_fingerprint_and_email | awk '{print $1}')
key_email=$(echo $key_fingerprint_and_email | awk '{print $2}')
{
"key_fingerprint=$key_fingerprint"
"key_email=$key_email"
} >> $GITHUB_OUTPUT
cat << EndOfFile >> $GITHUB_OUTPUT
key_fingerprint=$key_fingerprint
key_email=$key_email"
EndOfFile
generate-version-update-commits:
name: Generate Version Update Commits
Expand All @@ -49,10 +49,12 @@ jobs:
git config user.email "[email protected]"
git config user.name "Untrusted With Signing Privileges"
sbt "release with-defaults"
echo $GITHUB_WORKSPACE
cd `mktemp -d`
git clone --bare $GITHUB_WORKSPACE repo-with-unsigned-version-update-commits.git
rm -Rf $GITHUB_WORKSPACE
mv repo-with-unsigned-version-update-commits.git $GITHUB_WORKSPACE
rm -Rf $GITHUB_WORKSPACE/*
mv repo-with-unsigned-version-update-commits.git $GITHUB_WORKSPACE/
ls -lR $GITHUB_WORKSPACE
- uses: actions/cache/save@v3
with:
path: repo-with-unsigned-version-update-commits.git
Expand All @@ -75,6 +77,7 @@ jobs:
fail-on-cache-miss: true
- uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17
gpg-private-key: ${{ secrets.AUTOMATED_MAVEN_RELEASE_PGP_SECRET }}
- name: Create commit
Expand All @@ -97,10 +100,10 @@ jobs:
release_commit_id=$(git rev-parse HEAD^)
{
"release_tag=$release_tag"
"release_commit_id=$release_commit_id"
} >> $GITHUB_OUTPUT
cat << EndOfFile >> $GITHUB_OUTPUT
release_tag=$release_tag
release_commit_id=$release_commit_id
EndOfFile
git log --oneline -n3
git push
Expand Down Expand Up @@ -172,10 +175,10 @@ jobs:
fail-on-cache-miss: true
- name: Create tiny sbt project to perform Sonatype upload
run: |
cat <<EOT > build.sbt
cat << EndOfFile > build.sbt
sonatypeBundleDirectory := new File("/tmp/funky")
sonatypeProfileName := "com.gu"
EOT
EndOfFile
mkdir project
echo 'addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")' > project/plugins.sbt
Expand Down
7 changes: 1 addition & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ lazy val `etag-caching-root` = (project in file("."))
setReleaseVersion,
commitReleaseVersion,
tagRelease,
pushChanges,
// For non cross-build projects, use releaseStepCommand("publishSigned")
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
commitNextVersion
)
)

0 comments on commit f07ea02

Please sign in to comment.