Skip to content

Commit f7b092e

Browse files
authored
Merge pull request #184 from refinedmods/feat/GH-176/secret-inject
build: update the way secrets are injected for publishing
2 parents 170d891 + dc7c01e commit f7b092e

File tree

5 files changed

+9
-19
lines changed

5 files changed

+9
-19
lines changed

.github/workflows/publish-release.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,11 @@ jobs:
9898
- name: Publish to Maven
9999
run: ./gradlew publish
100100
env:
101-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102-
CREEPERHOST_MAVEN_USERNAME: ${{ secrets.CREEPERHOST_MAVEN_USERNAME }}
103-
CREEPERHOST_MAVEN_TOKEN: ${{ secrets.CREEPERHOST_MAVEN_TOKEN }}
101+
# https://docs.gradle.org/current/samples/sample_publishing_credentials.html#header
102+
ORG_GRADLE_PROJECT_GitHubPackagesUsername: ${{ env.GITHUB_ACTOR }}
103+
ORG_GRADLE_PROJECT_GitHubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}
104+
ORG_GRADLE_PROJECT_CreeperHostUsername: ${{ secrets.CREEPERHOST_MAVEN_USERNAME }}
105+
ORG_GRADLE_PROJECT_CreeperHostPassword: ${{ secrets.CREEPERHOST_MAVEN_TOKEN }}
104106

105107
publish-javadoc:
106108
name: Publish Javadoc

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Fixed publishing not working with the config cache.
13+
1014
## [0.19.0] - 2024-09-10
1115

1216
### Added

refinedarchitect-plugin/build.gradle.kts

-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ publishing {
3838
maven {
3939
name = "GitHubPackages"
4040
url = project.uri("https://maven.pkg.github.com/" + System.getenv("GITHUB_REPOSITORY"))
41-
credentials {
42-
username = System.getenv("GITHUB_ACTOR")
43-
password = System.getenv("GITHUB_TOKEN")
44-
}
4541
}
4642
}
4743
}

refinedarchitect-plugin/src/main/kotlin/BaseExtension.kt

-8
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,10 @@ open class BaseExtension(private val project: Project) {
103103
maven {
104104
name = "GitHubPackages"
105105
url = project.uri("https://maven.pkg.github.com/" + System.getenv("GITHUB_REPOSITORY"))
106-
credentials {
107-
username = System.getenv("GITHUB_ACTOR")
108-
password = System.getenv("GITHUB_TOKEN")
109-
}
110106
}
111107
maven {
112108
name = "CreeperHost"
113109
url = project.uri("https://maven.creeperhost.net/release")
114-
credentials {
115-
username = System.getenv("CREEPERHOST_MAVEN_USERNAME")
116-
password = System.getenv("CREEPERHOST_MAVEN_TOKEN")
117-
}
118110
}
119111
}
120112
publications {

refinedarchitect-versioning/build.gradle.kts

-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ publishing {
4646
maven {
4747
name = "GitHubPackages"
4848
url = project.uri("https://maven.pkg.github.com/" + System.getenv("GITHUB_REPOSITORY"))
49-
credentials {
50-
username = System.getenv("GITHUB_ACTOR")
51-
password = System.getenv("GITHUB_TOKEN")
52-
}
5349
}
5450
}
5551
publications {

0 commit comments

Comments
 (0)