File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version : " 20"
20+
21+ - name : Build dataset
22+ run : node scripts/build.js
23+
24+ - name : Extract version from tag
25+ id : version
26+ run : echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
27+
28+ - name : Extract changelog for this version
29+ id : changelog
30+ run : |
31+ # Extract the section for this version from CHANGELOG.md
32+ awk '/^## \['"${{ steps.version.outputs.version }}"'\]/{found=1; next} /^## /{if(found) exit} found' CHANGELOG.md > /tmp/release-notes.md
33+ echo "body<<RELEASE_EOF" >> "$GITHUB_OUTPUT"
34+ cat /tmp/release-notes.md >> "$GITHUB_OUTPUT"
35+ echo "RELEASE_EOF" >> "$GITHUB_OUTPUT"
36+
37+ - name : Create GitHub Release
38+ uses : softprops/action-gh-release@v2
39+ with :
40+ name : v${{ steps.version.outputs.version }}
41+ body : ${{ steps.changelog.outputs.body }}
42+ files : |
43+ data/cameras.json
44+ data/cameras.csv
You can’t perform that action at this time.
0 commit comments