Skip to content

Commit 7cf4944

Browse files
committed
prepare for the next release
- add release.sh script to automate most of the process - minor revisions to the unreleased changelog - migrate away from deprecated release asset action
1 parent 4dc672b commit 7cf4944

File tree

3 files changed

+49
-10
lines changed

3 files changed

+49
-10
lines changed

.github/workflows/main.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ jobs:
9090
make test
9191
9292
release:
93+
permissions:
94+
contents: write
9395
runs-on: ubuntu-22.04
9496
strategy:
9597
matrix:
@@ -107,11 +109,7 @@ jobs:
107109
- name: Create ZIP
108110
run: zip -r sv2v-${{ matrix.name }} ./sv2v-${{ matrix.name }}
109111
- name: Upload Release Asset
110-
uses: actions/[email protected]
111112
env:
112-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113-
with:
114-
upload_url: ${{ github.event.release.upload_url }}
115-
asset_path: ./sv2v-${{ matrix.name }}.zip
116-
asset_name: sv2v-${{ matrix.name }}.zip
117-
asset_content_type: application/zip
113+
GH_TOKEN: ${{ github.token }}
114+
GH_REPO: ${{ github.repository }}
115+
run: gh release upload ${{ github.event.release.tag_name }} sv2v-${{ matrix.name }}.zip

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010
* `unique`, `unique0`, and `priority` case statements now produce corresponding
1111
`parallel_case` and `full_case` statement attributes
1212
* Added support for attributes in unary, binary, and ternary expressions
13-
* Added support for shadowing interface names with local typenames
1413
* Added support for streaming concatenations within ternary expressions
14+
* Added support for shadowing interface names with local typenames
1515
* Added support for passing through `wait` statements
1616

1717
### Bug Fixes
1818

19-
* Fixed an issue that prevented parsing tasks and functions with `inout` ports
2019
* Fixed signed unsized literals with a leading 1 bit (e.g., `'sb1`, `'sh8f`)
2120
incorrectly sign-extending in size and type casts
2221
* Fixed conflicting genvar names when inlining interfaces and modules that use
2322
them; all genvars are now given a design-wide unique name
24-
* Fixed byte order of strings in size casts
2523
* Fixed unconverted structs within explicit type casts
24+
* Fixed byte order of strings in size casts
2625
* Fixed unconverted multidimensional struct fields within dimension queries
2726
* Fixed non-typenames (e.g., from packages or subsequent declarations)
2827
improperly shadowing the names of `struct` pattern fields
2928
* Fixed shadowing of interface array indices passed to port connections
3029
* Fixed failure to resolve typenames suffixed with dimensions in contexts
3130
permitting both types and expressions, e.g., `$bits(T[W-1:0])`
31+
* Fixed an issue that prevented parsing tasks and functions with `inout` ports
3232
* Fixed errant constant folding of shadowed non-trivial localparams
3333
* Fixed conversion of function calls with no arguments passed to other functions
3434
* Fixed certain non-ANSI style port declarations being incorrectly reported as

release.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -x
5+
6+
version=$1
7+
8+
# ensure there are no uncommitted changes
9+
[ "" == "$(git status --porcelain)" ]
10+
11+
# update the version in sv2v.cabal
12+
sed -i.bak -e "s/^version.*/version: $version/" sv2v.cabal
13+
diff sv2v.cabal{,.bak} && echo not changed && exit 1 || true
14+
rm sv2v.cabal.bak
15+
16+
# update the version in CHANGELOG.md
17+
sed -i.bak -e "s/^## Unreleased$/## v$version/" CHANGELOG.md
18+
diff CHANGELOG.md{,.bak} && echo not changed && exit 1 || true
19+
rm CHANGELOG.md.bak
20+
21+
# create the release commit and tag
22+
git commit -a -m "release v$version"
23+
git tag -a v$version HEAD -m "Release v$version"
24+
25+
# build and test
26+
make
27+
make test
28+
[ $version == `bin/sv2v --numeric-version` ]
29+
30+
# push the release commit and tag
31+
git push
32+
git push origin v$version
33+
34+
# create the GitHub release
35+
notes=`pandoc --from markdown --to markdown --wrap none CHANGELOG.md | \
36+
sed '3,/^## /!d' | \
37+
tac | tail -n +3 | tac`
38+
gh release create v$version --title v$version --notes "$notes"
39+
40+
# create the Hackage release candidate
41+
stack upload --test-tarball --candidate .

0 commit comments

Comments
 (0)