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

Add GitHub actions for CI and publish #14

Merged
merged 1 commit into from
Jul 25, 2021
Merged

Add GitHub actions for CI and publish #14

merged 1 commit into from
Jul 25, 2021

Conversation

doomspork
Copy link
Member

This a work in progress.

@doomspork doomspork force-pushed the github-actions branch 3 times, most recently from 32a529e to f27bd6f Compare July 25, 2021 01:09
@doomspork doomspork merged commit dd8984a into master Jul 25, 2021
@doomspork doomspork deleted the github-actions branch July 25, 2021 01:11
doomspork added a commit that referenced this pull request Jul 25, 2021
doomspork added a commit that referenced this pull request Jul 25, 2021
doomspork added a commit that referenced this pull request Jul 25, 2021
doomspork added a commit that referenced this pull request Jul 25, 2021
@doomspork
Copy link
Member Author

@btkostner you're a GitHub Action mastah, any thoughts on how we could handle tagging the commits + cutting a release?

@btkostner
Copy link
Member

btkostner commented Jul 25, 2021

If I was doing this, I'd use semantic-release to analyze the git commits, set the semver version, write the CHANGELOG.md file, and cut the GitHub release.

The standard config includes an npm plugin which tries to push the release to npm. You should be able to just take that plugin out and it should all work.

I think this configuration should work for what you're trying to do. It's possible to clean it up a bit and remove the VERSION file and just set it with an optional env variable. Possibly also include the changelog file in the hexdocs. I think you'll need to use npm to install the plugin packages though.

https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration-file

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/changelog",
    ["@semantic-release/exec", {
      "prepareCmd": "echo \"${nextRelease.version}\" > ./VERSION",
      "publishCmd": "mix hex.publish --yes"
    }],
    "@semantic-release/git",
    "@semantic-release/github"
  ]
}

Bonus points to create a hex release plugin. Seems pretty simple based on this APM one:
https://github.com/semantic-release/apm/tree/master/lib
Alternatively, there is an exec plugin that will let you run your own scripts.
https://github.com/semantic-release/exec

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

Successfully merging this pull request may close these issues.

2 participants