File tree Expand file tree Collapse file tree 2 files changed +74
-4
lines changed
Expand file tree Collapse file tree 2 files changed +74
-4
lines changed Original file line number Diff line number Diff line change 11name : Release
22on :
33 push :
4- tags :
5- - " *"
4+ branches :
5+ - main
6+ paths :
7+ - CHANGELOG.md
68jobs :
79 release :
810 runs-on : ubuntu-latest
911 steps :
1012 - name : Checkout
1113 uses : actions/checkout@v4
1214
15+ - name : Get version from CHANGELOG
16+ id : version
17+ run : |
18+ VERSION=$(grep -m1 -oP '## \[\K[^\]]+' CHANGELOG.md)
19+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
20+
21+ # extract release notes between first and second ## heading
22+ BODY=$(awk '/^## \[/{if(n++)exit}n' CHANGELOG.md)
23+ {
24+ echo "body<<RELEASE_EOF"
25+ echo "$BODY"
26+ echo "RELEASE_EOF"
27+ } >> "$GITHUB_OUTPUT"
28+
29+ - name : Check if tag exists
30+ id : check
31+ run : |
32+ if git rev-parse "${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
33+ echo "exists=true" >> "$GITHUB_OUTPUT"
34+ else
35+ echo "exists=false" >> "$GITHUB_OUTPUT"
36+ fi
37+
1338 - name : Install Nix
39+ if : steps.check.outputs.exists == 'false'
1440 uses : cachix/install-nix-action@v31
1541
1642 - name : Build
43+ if : steps.check.outputs.exists == 'false'
44+ env :
45+ VERSION : ${{ steps.version.outputs.version }}
1746 run : |
1847 nix develop --command bash -c '
19- sed -i "s|{/\* VERSION \*/}.*|${GITHUB_REF##*/ }|g" src/index.jsx
48+ sed -i "s|{/\* VERSION \*/}.*|${VERSION }|g" src/index.jsx
2049
2150 npm ci
2251 npm run build
2756 '
2857
2958 - name : Release
59+ if : steps.check.outputs.exists == 'false'
3060 uses : softprops/action-gh-release@v2
31- if : startsWith(github.ref, 'refs/tags/')
3261 with :
62+ tag_name : ${{ steps.version.outputs.version }}
63+ body : ${{ steps.version.outputs.body }}
3364 files : " *.zip"
Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ All notable changes to this project will be documented in this file.
4+
5+ The format is based on [ Keep a Changelog] ( https://keepachangelog.com/ ) ,
6+ and this project adheres to [ Semantic Versioning] ( https://semver.org/ ) .
7+
8+ ## [ 0.5.0]
9+
10+ ### Changed
11+
12+ - Migrate from preact-cli to vite
13+ - Replace react-modal, axios, and lodash with native APIs
14+ - Convert class components to functional components
15+ - Use nix in CI workflow
16+
17+ ## [ 0.4.0]
18+
19+ ### Removed
20+
21+ - Unused lighttpd configuration
22+
23+ ## [ 0.3.2]
24+
25+ ### Changed
26+
27+ - Use nord theme for softer color palette
28+
29+ ## [ 0.3.1]
30+
31+ ### Changed
32+
33+ - Simplify and cleanup table layout
34+
35+ ## [ 0.3.0]
36+
37+ ### Changed
38+
39+ - Grey-out rows of ports which aren't established
You can’t perform that action at this time.
0 commit comments