0.3.11 #15
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: clojure:lein | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install os deps | |
run: | | |
apt-get -qq update && apt-get -qy install rpm fakeroot bzip2 | |
- name: install lein deps | |
run: | | |
lein install | |
- name: build packages | |
run: | | |
lein pkg | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: | | |
./target/*.deb | |
./target/*.rpm | |
./target/*.md5 | |
./target/*.jar | |
./target/*.bz2 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ github.ref_name }} | |
draft: true | |
generate_release_notes: true | |
files: ./target/*${{ github.ref_name }}* | |
api_docs: | |
runs-on: ubuntu-latest | |
container: clojure:lein | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install os deps | |
run: | | |
apt-get -qq update && apt-get -qy install git | |
- name: Fetch all tags | |
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set environment variable for the current tag | |
run: echo "CURRENT_TAG=${{ github.ref_name }}" >> $GITHUB_ENV | |
- name: Retrieve previous tag | |
run: echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0 ${{ env.CURRENT_TAG }}^)" >> $GITHUB_ENV | |
- name: install lein deps | |
run: | | |
lein install | |
- name: build docs | |
run: | | |
lein codox | |
- name: Checkout gh-pages branch | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Update version in files | |
run: | | |
cd gh-pages | |
sed -i 's/${{ env.PREVIOUS_TAG }}/${{ env.CURRENT_TAG }}/g' index.html | |
sed -i 's/${{ env.PREVIOUS_TAG }}/${{ env.CURRENT_TAG }}/g' quickstart.html | |
- name: Commit and push changes | |
run: | | |
cd gh-pages | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "Update version from ${{ env.PREVIOUS_TAG }} to ${{ env.CURRENT_TAG }}" | |
git push origin gh-pages | |
# clojars: | |
# runs-on: ubuntu-latest | |
# container: clojure:lein | |
# needs: build | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: install os deps | |
# run: apt-get -qq update | |
# - name: install lein deps | |
# run: | | |
# lein install | |
# - name: deploy to clojars | |
# env: | |
# LEIN_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | |
# LEIN_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} | |
# run: | | |
# lein deploy clojars | |
docker: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: | | |
riemannio/riemann:latest | |
riemannio/riemann:${{ github.ref_name }} |