Skip to content

Commit 5d7ff8e

Browse files
Fix release tagging
1 parent 8316379 commit 5d7ff8e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/tag-to-draft-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ jobs:
3737
json=$(find ./package/versions -name package_rp2040_index.json)
3838
log=$(find ./package/versions -name package_rp2040_index.log)
3939
zip=$(find ./package/versions -name rp2040*zip)
40-
python3 ./package/upload_release.py --user "$GITHUB_ACTOR" --repo "$GITHUB_REPOSITORY" --token "$CI_GITHUB_API_KEY" --tag "$(git describe --exact-match --tags)" --name "Release $TRAVIS_TAG" --msg "@$log" "$zip" "$json"
40+
tag=$(find ./package/versions -name package_rp2040_index.tag -exec cat \{\} \;)git describe --exact-match --tags)
41+
python3 ./package/upload_release.py --user "$GITHUB_ACTOR" --repo "$GITHUB_REPOSITORY" --token "$CI_GITHUB_API_KEY" --tag "$tag" --name "Release $tag" --msg "@$log" "$zip" "$json"

package/build_boards_manager_package.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ base_ver=$prev_any_release
9999
new_log=$(mktemp)
100100
git fetch --all --tags
101101
git log $base_ver..HEAD --oneline | sed 's/\b / * /' | cut -f2- -d" " > $new_log
102+
new_tag=$(mktemp)
103+
git describe --exact-match --tags > $new_tag
102104

103105
# Do some replacements in platform.txt file, which are required because IDE
104106
# handles tool paths differently when package is installed in hardware folder
@@ -176,7 +178,8 @@ set -e
176178
cat $new_json | jq empty
177179

178180
cat $new_log > package_rp2040_index.log
179-
rm -f $new_log
181+
cat $new_tag > package_rp2040_index.tag
182+
rm -f $new_log $new_tag
180183

181184
popd
182185
popd

package/upload_release.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020

2121
if args.msg[0] == '@':
2222
with open(args.msg[1:], 'r') as f:
23-
args.msg = re.sub(r'\n', '<br />', f.read())
24-
25-
print("Upload message: " + args.msg)
23+
args.msg = f.read()
2624

2725
gh = Github(login_or_token=args.token)
2826
repo = gh.get_repo(str(args.repo))

0 commit comments

Comments
 (0)