Skip to content

Commit

Permalink
Fixes the release pipeline (#119)
Browse files Browse the repository at this point in the history
* Adds release tag filters to jobs as well.

* Disables configuration cache for the publish task.
  • Loading branch information
JayShortway authored Jun 27, 2024
1 parent 0e3951a commit c1adc5c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
24 changes: 19 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
aliases:
# Uses the same regex as release-tags-job
release-tags-workflow: &release-tags-workflow
when:
and:
- matches: { pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+(?!.*-SNAPSHOT).*$", value: << pipeline.git.tag >> }
- not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
# Uses the same regex as release-tags-workflow
release-tags-job: &release-tags-job
filters:
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+(?!.*-SNAPSHOT).*$/
branches:
ignore: /.*/

version: 2.1

orbs:
Expand Down Expand Up @@ -259,14 +275,12 @@ workflows:
# to Maven Central and creates a GitHub release for it. The release train has
# now completed its journey.
on-release-tag:
when:
and:
- matches: { pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+(?!.*-SNAPSHOT).*$", value: << pipeline.git.tag >> }
- not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
<<: *release-tags-workflow
jobs:
- publish:
snapshot: false
context: maven-central-publishing
<<: *release-tags-job
- create-github-release:
context: github-bot-public
<<: *release-tags-job
5 changes: 4 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,8 @@ def publish
ENV["ORG_GRADLE_PROJECT_mavenCentralPassword"] = ENV["SONATYPE_NEXUS_TOKEN_PASSWORD"]
ENV["ORG_GRADLE_PROJECT_signingInMemoryKey"] = ENV["SIGNING_GPG_IN_MEMORY"]
ENV["ORG_GRADLE_PROJECT_signingInMemoryKeyPassword"] = ENV["GPG_SIGNING_KEY_PW_NEW"]
gradle(task: "publishAllPublicationsToMavenCentralRepository")
gradle(
task: "publishAllPublicationsToMavenCentralRepository",
flags: "--no-configuration-cache"
)
end

0 comments on commit c1adc5c

Please sign in to comment.