🔖 Released v1.0.3 #4
Workflow file for this run
This file contains hidden or 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: | |
- "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 |