Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tagged releases and release artifacts #41

Open
4 of 7 tasks
grantmacken opened this issue Nov 22, 2021 · 6 comments
Open
4 of 7 tasks

tagged releases and release artifacts #41

grantmacken opened this issue Nov 22, 2021 · 6 comments

Comments

@grantmacken
Copy link
Contributor

grantmacken commented Nov 22, 2021

For xqerl on this repo I would like to work on achieving

  • tagged releases: after issue resolved, passed github-action checks and pr merged into main.In short a basic CI pipeline via gh actions to get tagged releases.
  • tagged releases published to hex: via github actions
  • downloadable release tar artifact(s): as a product of rebar3 as prod tar via gh actions
  • xqerl as an installable executable,
    • for linux or mac a simple Makefile:
      • make untars artifact into '/usr/local/xqerl' and make install places xqerl exec on PATH '/usr/bin/xqerl'
  • xqerl as a service: xqerl runs on boot listening on port 8081
    For linux this will be a 'systemd' conf template
    and make service will install and enable the service.
  • container images published to container registries: github packages and dockerhub.
    These available on this repo instead of my repo as is the case now.
    The images will be built with podman in gh actions.

@zadean If it is ok in my fork, I will start working on this and open some PRs.

@zadean
Copy link
Owner

zadean commented Nov 22, 2021

Yes please! This sounds great 👍

@grantmacken
Copy link
Contributor Author

WIP
the git-hub action splits

  1. on a pushing commits to main branch
    https://github.com/grantmacken/xqerl/actions/runs/1513756228
    The building phase can reuse a cache aka the _build dir generated via rebar3 compile
    and creates a work-flow run artefact which is the tar generated via rebar3 as prod tar
    https://github.com/grantmacken/xqerl/suites/4487390564/artifacts/119549585

  2. on pushing an annotated tag commit
    https://github.com/grantmacken/xqerl/actions/runs/1513761157

If annotated tag, then

  1. release artifact is created
    https://github.com/grantmacken/xqerl/releases/tag/v0.03
  2. docker image is created and publish to github packages repo
    https://github.com/grantmacken/xqerl/pkgs/container/xqerl

Only pushing a tag will create the release asset artefact and the docker images.
@zadean let me know if you think this is the right approach?
@zadean If you have a docker account we can push the images to dockerhub also.

re the docker images branch , I'll tidy up my git commit history on my branch and do another pull-request

@zadean
Copy link
Owner

zadean commented Dec 1, 2021

Artifacts on tag, 100% yes!
Hex publishing, 100%

I haven't had the need for an executable really, but I think that is definitely something interesting for others (We don't make this stuff for ourselves, right?).

So, yeah, totally going in a great direction!

@grantmacken
Copy link
Contributor Author

grantmacken commented Dec 8, 2021

Hex publishing, 100%
@zadean
Started work on this.
https://github.com/zadean/xqerl/compare/main...grantmacken:feature-41-publish-hex?expand=1

WIP Notes: rebar3 hex publish
all xqerl dependencies as shown via rebar3 tree will have to be hex packages.

Only Hex packages may be used as dependencies of the package.
It is not possible to upload packages with Git dependencies.

I see others when running actions, will run rebar3 edoc prior to publish

# ln -s /rebar3/.config ~/.config
rebar3 edoc
rebar3 hex publish -r hexpm --yes

When I try to run rebar3 edoc, I get multiple errors.
My understanding is that you can publish with no 'hex docs'
I think the publish cmd, by convention will create hex docs only if the docs folder is present.
Not sure if it looks for docs in root dir or _build. If root then we have a prob, or need to add a index file to docs dir

@zadean
Copy link
Owner

zadean commented Jan 6, 2022

@grantmacken, I've changed all of the dependencies to hex versions, so that should be good to go now. #55 and #56

All it took was adding 6 of my repos to hex.pm! 😂

edoc should also work. There were a number of comments that broke it, but they are fixed.

I think eventually, edoc should use ex_doc or something else that is more pretty, but for now, just happy it makes docs!

As for the location of the doc folder, it is in the root. I guess it could be added to the repo as an empty directory.

@grantmacken
Copy link
Contributor Author

@zadean see PR #57

The CI now generates edocs and ex_docs
After you merge the PR into main, there is a new Makefile
make build builds both sort of docs

rebar3 do deps, compile, edoc
rebar3 hex build

Both now compile OK. but the docs do have plenty of room for improvement.
Anyway I think they good enough to get a xqerl release out the door and published to hexpm

@grantmacken, I've changed all of the dependencies to hex versions, so that should be good to go now. #55 and #56

All it took was adding 6 of my repos to hex.pm! joy

edoc should also work. There were a number of comments that broke it, but they are fixed.

I think eventually, edoc should use ex_doc or something else that is more pretty, but for now, just happy it makes docs!

As for the location of the doc folder, it is in the root. I guess it could be added to the repo as an empty directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants