mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 15:51:04 +00:00
[CI] Fix release notification message, and add rustc version to release notes (#1191)
* Release announcements: s/kusama/polkadot/ * Additional debug info for gitlab publish script * add rustc version check job * fully comment out tag-checking * s/podman/docker/g * Switch to rust-builder image and install jq * remove temporary TODOs
This commit is contained in:
+3
-3
@@ -20,13 +20,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
room_id: ${{ secrets.VALIDATOR_LOUNGE_MATRIX_ROOM_ID }}
|
room_id: ${{ secrets.VALIDATOR_LOUNGE_MATRIX_ROOM_ID }}
|
||||||
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
||||||
message: "***Kusama ${{github.event.release.tag_name}} has been released!***<br/>Please update at your earliest convenience.<br/>${{github.event.release.html_url}}<br/><br/>${{github.event.release.body}}<br/>"
|
message: "***Polkadot ${{github.event.release.tag_name}} has been released!***<br/>Please update at your earliest convenience.<br/>${{github.event.release.html_url}}<br/><br/>${{github.event.release.body}}<br/>"
|
||||||
server: "matrix.parity.io"
|
server: "matrix.parity.io"
|
||||||
|
|
||||||
- name: Kusama Announcements
|
- name: Polkadot Announcements
|
||||||
uses: s3krit/matrix-message-action@v0.0.2
|
uses: s3krit/matrix-message-action@v0.0.2
|
||||||
with:
|
with:
|
||||||
room_id: ${{ secrets.KUSAMA_ANNOUNCEMENTS_MATRIX_ROOM_ID }}
|
room_id: ${{ secrets.KUSAMA_ANNOUNCEMENTS_MATRIX_ROOM_ID }}
|
||||||
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
||||||
message: "***Kusama ${{github.event.release.tag_name}} has been released!***<br/>Please update at your earliest convenience.<br/>${{github.event.release.html_url}}<br/><br/>${{github.event.release.body}}<br/>"
|
message: "***Polkadot ${{github.event.release.tag_name}} has been released!***<br/>Please update at your earliest convenience.<br/>${{github.event.release.html_url}}<br/><br/>${{github.event.release.body}}<br/>"
|
||||||
server: "matrix.parity.io"
|
server: "matrix.parity.io"
|
||||||
|
|||||||
@@ -98,11 +98,11 @@ check-line-width:
|
|||||||
|
|
||||||
publish-draft-release:
|
publish-draft-release:
|
||||||
stage: test
|
stage: test
|
||||||
image: parity/tools:latest
|
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/ # i.e. v1.0.1, v2.1.0rc1
|
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/ # i.e. v1.0.1, v2.1.0rc1
|
||||||
script:
|
script:
|
||||||
|
- apt-get -y update; apt-get -y install jq
|
||||||
- ./scripts/gitlab/publish_draft_release.sh
|
- ./scripts/gitlab/publish_draft_release.sh
|
||||||
interruptible: true
|
interruptible: true
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ check_tag () {
|
|||||||
repo=$1
|
repo=$1
|
||||||
tagver=$2
|
tagver=$2
|
||||||
if [ -n "$GITHUB_RELEASE_TOKEN" ]; then
|
if [ -n "$GITHUB_RELEASE_TOKEN" ]; then
|
||||||
|
echo '[+] Fetching tag using privileged token'
|
||||||
tag_out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/git/refs/tags/$tagver")
|
tag_out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/git/refs/tags/$tagver")
|
||||||
else
|
else
|
||||||
|
echo '[+] Fetching tag using unprivileged token'
|
||||||
tag_out=$(curl -H "Authorization: token $GITHUB_PR_TOKEN" -s "$api_base/$repo/git/refs/tags/$tagver")
|
tag_out=$(curl -H "Authorization: token $GITHUB_PR_TOKEN" -s "$api_base/$repo/git/refs/tags/$tagver")
|
||||||
fi
|
fi
|
||||||
tag_sha=$(echo "$tag_out" | jq -r .object.sha)
|
tag_sha=$(echo "$tag_out" | jq -r .object.sha)
|
||||||
@@ -31,6 +33,7 @@ check_tag () {
|
|||||||
if [ "$tag_sha" = "null" ]; then
|
if [ "$tag_sha" = "null" ]; then
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
echo "[+] Tag object SHA: $tag_sha"
|
||||||
verified_str=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$object_url" | jq -r .verification.verified)
|
verified_str=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$object_url" | jq -r .verification.verified)
|
||||||
if [ "$verified_str" = "true" ]; then
|
if [ "$verified_str" = "true" ]; then
|
||||||
# Verified, everything is good
|
# Verified, everything is good
|
||||||
|
|||||||
@@ -24,9 +24,13 @@ case $? in
|
|||||||
;;
|
;;
|
||||||
1) echo '[!] Tag found but has not been signed. Aborting release.'; exit 1
|
1) echo '[!] Tag found but has not been signed. Aborting release.'; exit 1
|
||||||
;;
|
;;
|
||||||
2) echo '[!] Tag not found. Aborting release.'; exit
|
2) echo '[!] Tag not found. Aborting release.'; exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Pull rustc version used by rust-builder for stable and nightly
|
||||||
|
stable_rustc="$(rustc +stable --version)"
|
||||||
|
nightly_rustc="$(rustc +nightly --version)"
|
||||||
|
|
||||||
# Start with referencing current native runtime
|
# Start with referencing current native runtime
|
||||||
# and find any referenced PRs since last release
|
# and find any referenced PRs since last release
|
||||||
# Note: Drop any changes that begin with '[contracts]' or 'contracts:'
|
# Note: Drop any changes that begin with '[contracts]' or 'contracts:'
|
||||||
@@ -41,6 +45,10 @@ release_text="Polkadot native runtime: $polkadot_spec
|
|||||||
Kusama native runtime: $kusama_spec
|
Kusama native runtime: $kusama_spec
|
||||||
|
|
||||||
Westend native runtime: $westend_spec
|
Westend native runtime: $westend_spec
|
||||||
|
|
||||||
|
This release was built with the following versions of \`rustc\`. Other versions may work.
|
||||||
|
- $stable_rustc
|
||||||
|
- $nightly_rustc
|
||||||
"
|
"
|
||||||
|
|
||||||
runtime_changes=""
|
runtime_changes=""
|
||||||
|
|||||||
Reference in New Issue
Block a user