MobilityData / gtfs-validator

Canonical GTFS Validator project for schedule (static) files.
https://gtfs-validator.mobilitydata.org/
Apache License 2.0
290 stars 101 forks source link

Publishing maven package GitHub action is failing #1906

Closed davidgamez closed 2 weeks ago

davidgamez commented 1 month ago

Description

The update-release-assets GitHub action failed in the last 6.0.0 release. It looks like the 1password key was changed and its reference is not invalid.

https://github.com/MobilityData/gtfs-validator/actions/runs/11521874673/job/32076491158

As a recommendation, we should add the 1password reference as a GitHub environment variable to avoid changing the action code when keys are re-generated/updated.

jcpitre commented 1 month ago

I believe the entry to use from 1password is:

And here are the new values of the variables in publish_assets.yml:

Which are not the same as the ones we have now.

To be confirmed.

jcpitre commented 1 month ago

I tried publishing from the command line following this , but I got this error: FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:publishMavenJavaPublicationToMavenRepository'.
> Failed to publish publication 'mavenJava' to repository 'maven'
   > Could not PUT 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/org/mobilitydata/gtfs-validator/gtfs-validator-core/6.0.0/gtfs-validator-core-6.0.0.jar'. Received status code 401 from server: Content access is protected by token

It seems sonatype will not accept username/password any more. It will require tokens. See this

jcpitre commented 1 month ago

Created a token and used it to do the release. Tested and published. The 6.0.0 jars are now available. See the core jar, the model jar and the main jar.

Still need to modify the release code for next time.