Skip to content

🔖 Released v1.0.2 #3

🔖 Released v1.0.2

🔖 Released v1.0.2 #3

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Hermes ChangeLog
uses: actions/checkout@v4
with:
path: "Hermes"
ref: "${{ github.ref_name }}"
persist-credentials: false
sparse-checkout: |
ChangeLog.md
sparse-checkout-cone-mode: false
- name: Reduce changelog only to release content, and add link to offline doc
run: |
sed -n '/^## \[${{ github.ref_name }}\]/,/^## \[v[0-9]\+\.[0-9]\+\.[0-9]\+\]/ p' < "./Hermes/ChangeLog.md" > ChangeLog.tmp.md
tail -n -1 ChangeLog.tmp.md | grep -q '^## \[v[0-9]\+\.[0-9]\+\.[0-9]\+\]' && head -n -1 < ChangeLog.tmp.md > ChangeLog.md || mv ChangeLog.tmp.md ChangeLog.md
sed -i '3i Offline documentation of this version is available [here](https://github.com/DSIN-INSA-Strasbourg/Hermes-doc/releases/download/${{ github.ref_name }}/Hermes-doc-${{ github.ref_name }}.tgz).\n' ChangeLog.md
- name: Publish release
uses: softprops/action-gh-release@v2
with:
body_path: ChangeLog.md