Releasing a new version #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Releasing a new version | |
on: workflow_dispatch | |
env: | |
USERNAME: ${{ secrets.GITHUB_ACTOR }} | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: temurin | |
server-id: github | |
settings-path: ${{ github.workspace }} | |
- name: Setup Clojure | |
uses: DeLaGuardo/setup-clojure@12.1 | |
with: | |
cli: 1.11.1.1413 | |
- name: Generate docs | |
run: | | |
clojure -T:build doc | |
- name: Copy docs to the correct folder | |
run: | | |
VERSION=$(clojure -T:build version) | |
mkdir -p publish/docs/$VERSION | |
cp -rf target/doc/. publish/docs/$VERSION | |
- name: Generate JAR | |
run: | | |
clojure -T:build jar | |
- name: Publish docs to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ github.token }} | |
publish_dir: ./publish | |
keep_files: true # otherwise the old docs are removed | |
- name: Publish JAR to Github Packages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cp target/classes/META-INF/maven/org.sbrubbles/conditio-clj/pom.xml . | |
mvn deploy -s $GITHUB_WORKSPACE/settings.xml |