Skip to content

Commit 342e919

Browse files
committed
Testing GH actions with a snapshot version
1 parent 64f9abc commit 342e919

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/publish_assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
VARIABLES_TO_EXTRACT: 'MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY, MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME, MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD'
100100
ONE_PASSWORD_SECRET_REFERENCES: ${{ vars.ONE_PASSWORD_SECRET_REFERENCES }}
101101

102-
- name: Build and Publish to Sonatype
102+
- name: Build and Publish to Maven Central
103103
run: |
104104
# Publishing to Maven Central will fail if the version is a snapshot, i.e. there is no version tag
105105
# directly on the current commit.

build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
*/
1616
/*
1717
* A note about publishing and signing.
18-
* Maven central requires that artifacts be signed. And upload is done to Sonatype.
18+
* Maven central requires that artifacts be signed. And upload is done via Maven Central Portal.
1919
* To publish you will need these environment variables defined:
20+
* MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME
21+
* MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD
2022
* MAVEN_GPG_PRIVATE_KEY
2123
* MAVEN_GPG_PASSPHRASE
22-
* Suggestion is to put these in a shell script with restricted read permissions, then source it before calling
23-
* ./gradlew publish.
24+
* If run manually, the suggestion is to put these in a shell script with restricted read permissions,
25+
* then source it before calling ./gradlew
26+
* If run from a Github action, make sure these environment variables are defined.
2427
*/
2528
plugins {
2629
id 'java'
@@ -38,7 +41,7 @@ allprojects {
3841

3942
// Per the axion-release plugin, this computes the project version based
4043
// on the most recent tag in the repo.
41-
version "1.2"
44+
version scmVersion.version
4245

4346
repositories {
4447
mavenCentral()

scripts/publish_to_maven_central.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ bearer_token=$(echo "$MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME:$MAVEN_CENTRAL_PORTAL_
2222
# publishingType=USER_MANAGED means that the artefacts will be uploaded and verified, but not yet published.
2323
# See https://central.sonatype.com/publishing/deployments (you need to login as mobilitydata)
2424
# From this page you can examine the list of artefacts, and either drop them or release them.
25-
# If you want to remove that step, use publishingType=AUTOMATIC, that will publish directly.
25+
# If you want to remove that step, use publishingType=AUTOMATIC below, that will publish directly.
2626
# Note that once published you cannot remove or alter the artifacts.
2727
answer=$(curl --request POST \
2828
--verbose \

0 commit comments

Comments
 (0)