Skip to content

Commit 62ca5ee

Browse files
committed
Fix release.yml tag pattern and add PackageCloud token conditional
1 parent 74c44f3 commit 62ca5ee

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ on:
22
push:
33
# Sequence of patterns matched against refs/tags
44
tags:
5-
- 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching v*, i.e. v1.0, v20.15.10
5+
- '*.*.*' # Push events to matching semver tags (no v prefix)
66

77
name: Upload Release Asset
88

gradle/publishing.gradle

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,18 @@ publishing {
5656
}
5757
}
5858
repositories {
59-
maven {
60-
name = "PackageCloudTest"
61-
url = uri("https://packagecloud.io/pagerduty/rundeckpro-test/maven2")
62-
authentication {
63-
header(HttpHeaderAuthentication)
64-
}
65-
credentials(HttpHeaderCredentials) {
66-
name = "Authorization"
67-
value = "Bearer " + (System.getenv("PKGCLD_WRITE_TOKEN") ?: project.findProperty("pkgcldWriteToken"))
59+
def pkgcldWriteToken = System.getenv("PKGCLD_WRITE_TOKEN") ?: project.findProperty("pkgcldWriteToken")
60+
if (pkgcldWriteToken) {
61+
maven {
62+
name = "PackageCloudTest"
63+
url = uri("https://packagecloud.io/pagerduty/rundeckpro-test/maven2")
64+
authentication {
65+
header(HttpHeaderAuthentication)
66+
}
67+
credentials(HttpHeaderCredentials) {
68+
name = "Authorization"
69+
value = "Bearer " + pkgcldWriteToken
70+
}
6871
}
6972
}
7073
}

0 commit comments

Comments
 (0)