barbeau / earth-gravitational-model

A lightweight port of the GeoTools EarthGravitationalModel (http://docs.geotools.org/latest/javadocs/org/geotools/referencing/operation/transform/EarthGravitationalModel.html).
GNU Lesser General Public License v2.1
17 stars 7 forks source link

Publish artifact as package #8

Closed mipastgt closed 3 years ago

mipastgt commented 3 years ago

It would be nice if you could slightly extend your workflow and publish this artifact as a package so that people can directly use this as a dependency and don't have to build it themselves. This would significantly simplify other peoples workflows. See: https://github.com/features/packages

barbeau commented 3 years ago

@mipastgt Agreed! That's certainly my intent here, although I was still considering whether to package the model file directly in the library or allow it to be passed in by the application (e.g., to avoid increasing the initial download size of mobile apps).

I suppose I could always just release a v1 as-is and iterate on that with a different design. FYI, I work on this project on my lunch breaks (along with others) so it may move slowly.

Michael14K commented 3 years ago

Hi @barbeau, I wanted to ask exactly the same question! It would be great if this could be added as a dependency. It would make it a lot easier for developers (including myself) to add it. Thanks a lot for your work on this! I appreciate it so much. Cheers!

mipastgt commented 3 years ago

@barbeau For my own purposes I am currently using a fork of your project because of this. The only thing you would have to do is add the Gradle equivalent of this

    - name: Publish to GitHub Packages Apache Maven
      run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
      env:
        GITHUB_TOKEN: ${{ github.token }}

to your workflow.

barbeau commented 3 years ago

Ok, this should now be fixed. I set up a GitHub Action to publish a package upon creating a release, and I just released v1.0.0. 🎉

Release: https://github.com/barbeau/earth-gravitational-model/releases/tag/v1.0.0

Package: https://github.com/barbeau/earth-gravitational-model/packages/1027347

Dependency info in README: https://github.com/barbeau/earth-gravitational-model

If you could give this a try and let me know if it works that would be great! I didn't realize that GitHub requires authentication to access packages when configured as a dependency in pom.xml or build.gradle, which is a little strange, but I think I've linked to the correct config in the README.

If I got anything wrong please let me know.

mipastgt commented 3 years ago

After I correctly configured my credentials to access the package on GitHub everything worked as expected. I probably can delete my fork now :-) Thank you very much.

barbeau commented 3 years ago

@mipastgt You're welcome, glad it works!

mipastgt commented 3 years ago

Well, it is working when I do a local build but the necessary changes break my GitHub Actions at the moment. Just looking how to fix that.