clj-github-actions-example
September 16, 2021 · View on GitHub
An example of testing & releasing a Clojure library using Github Actions
See here:
- .github/workflows/clojure.yml runs tests for the master branch and each pull request against master
- .github/workflows/release.yml builds and deploys a release to Clojars when
- The release branch gets a push
- A release gets published on Github
Future ideas:
- Reuse the jar built by the test workflow in the deploy workflow
- Automate commiting and tagging a release
- Sign releases
A Word on Authentication
- A Clojars deploy token is saved as a Github repository secret.
- Leiningen is configured to read the deploy token from the environment variable
CLOJARS_DEPLOY_TOKEN. - The Github Actions Release workflow exposes the secret as this environment variable.
License
Copyright © Joel Kaasinen
Distributed under the Eclipse Public License, the same as Clojure.