Skip to content

Commit 12825aa

Browse files
authored
Merge pull request #2646 from input-output-hk/dlachaume/2638/enhance-release-notes
ci: add extra information to release notes
2 parents 5a699e2 + 757fd5e commit 12825aa

File tree

4 files changed

+81
-12
lines changed

4 files changed

+81
-12
lines changed

.github/workflows/actions/prepare-distribution/action.yml

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ description: |
55
The artifacts for all supported environments must have been downloaded
66
in "package-{EnvName}-x64" subfolders before calling this action.
77
inputs:
8-
version-name:
9-
description: Name of the version to package
8+
tag:
9+
description: The tag to use for the distribution
1010
required: true
1111
download-url-base:
1212
description: Base url where the released distribution will be downloadable
@@ -20,13 +20,28 @@ inputs:
2020
runs:
2121
using: "composite"
2222
steps:
23+
- name: Get short SHA
24+
id: slug
25+
shell: bash
26+
run: echo "sha8=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
27+
28+
- name: Compute version name
29+
id: compute-version-name
30+
shell: bash
31+
run: |
32+
if [[ "${{ inputs.tag }}" == "unstable" ]]; then
33+
echo "version-name=unstable-${{ steps.slug.outputs.sha8 }}" >> $GITHUB_OUTPUT
34+
else
35+
echo "version-name=${{ inputs.tag }}" >> $GITHUB_OUTPUT
36+
fi
37+
2338
- name: Package distribution (Linux-X64)
2439
shell: bash
2540
run: |
2641
python3 ./.github/workflows/scripts/package-distribution.py \
2742
--input package-Linux-X64/ \
2843
--dest package/ \
29-
--version "${{ inputs.version-name }}" \
44+
--version "${{ steps.compute-version-name.outputs.version-name }}" \
3045
--target "linux-x64"
3146
3247
- name: Package distribution (Linux-ARM64)
@@ -35,7 +50,7 @@ runs:
3550
python3 ./.github/workflows/scripts/package-distribution.py \
3651
--input package-Linux-ARM64/ \
3752
--dest package/ \
38-
--version "${{ inputs.version-name }}" \
53+
--version "${{ steps.compute-version-name.outputs.version-name }}" \
3954
--target "linux-arm64"
4055
4156
- name: Package distribution (macOS-ARM64)
@@ -44,7 +59,7 @@ runs:
4459
python3 ./.github/workflows/scripts/package-distribution.py \
4560
--input package-macOS-ARM64/ \
4661
--dest package/ \
47-
--version "${{ inputs.version-name }}" \
62+
--version "${{ steps.compute-version-name.outputs.version-name }}" \
4863
--target "macos-arm64"
4964
5065
- name: Package distribution (Windows-X64)
@@ -53,7 +68,7 @@ runs:
5368
python3 ./.github/workflows/scripts/package-distribution.py \
5469
--input package-Windows-X64/ \
5570
--dest package/ \
56-
--version "${{ inputs.version-name }}" \
71+
--version "${{ steps.compute-version-name.outputs.version-name }}" \
5772
--target "windows-x64"
5873
5974
- name: Package Explorer
@@ -63,7 +78,7 @@ runs:
6378
--input package-explorer/ \
6479
--dest package/ \
6580
--name "mithril-explorer" \
66-
--version "${{ inputs.version-name }}"
81+
--version "${{ steps.compute-version-name.outputs.version-name }}"
6782
6883
- name: Prepare crates versions table
6984
shell: bash
@@ -127,6 +142,27 @@ runs:
127142
\`git tag -d unstable && git fetch origin tag unstable\`
128143
EOF
129144
145+
- name: Download a binary asset
146+
shell: bash
147+
run: |
148+
cat >> ./release-notes-addon.txt << EOF
149+
150+
## Download a binary asset
151+
To simplify the installation and updating of Mithril binaries, we have created a one line installer that downloads and installs the Mithril binaries for you.
152+
This installer is available for Linux and macOS and supports the Mithril signer, Mithril aggregator, and Mithril client CLI.
153+
154+
Use the following commands to install the Mithril nodes:
155+
156+
- Download the **Mithril signer** in the current directory:
157+
\`curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/input-output-hk/mithril/refs/heads/main/mithril-install.sh | sh -s -- -c mithril-signer -d ${{ inputs.tag }} -p $(pwd)\`
158+
159+
- Download the **Mithril client CLI** in the current directory:
160+
\`curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/input-output-hk/mithril/refs/heads/main/mithril-install.sh | sh -s -- -c mithril-client -d ${{ inputs.tag }} -p $(pwd)\`
161+
162+
- Download the **Mithril aggregator** in the current directory:
163+
\`curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/input-output-hk/mithril/refs/heads/main/mithril-install.sh | sh -s -- -c mithril-aggregator -d ${{ inputs.tag }} -p $(pwd)\`
164+
EOF
165+
130166
- name: Create and sign sha256 checksum
131167
shell: bash
132168
env:
@@ -141,6 +177,27 @@ runs:
141177
DOWNLOAD_URL_BASE: ${{ inputs.download-url-base }}
142178
run: ./.github/workflows/scripts/verify-distribution.sh
143179

180+
- name: Download a Docker image
181+
shell: bash
182+
run: |
183+
if [[ "${{ inputs.tag }}" == "unstable" ]]; then
184+
MITHRIL_IMAGE_ID="main-${{ steps.slug.outputs.sha8 }}"
185+
else
186+
MITHRIL_IMAGE_ID="${{ inputs.tag }}-${{ steps.slug.outputs.sha8 }}"
187+
fi
188+
189+
cat >> ./release-notes-addon.txt << EOF
190+
191+
## Download a Docker image
192+
You can directly pull prebuilt Mithril Docker images:
193+
194+
| Binary | Image name | URL |
195+
| ------------------ | :----------------------------------: | :----------------------------------------------------------: |
196+
| mithril-aggregator | mithril-aggregator:$MITHRIL_IMAGE_ID | ghcr.io/input-output-hk/mithril-aggregator:$MITHRIL_IMAGE_ID |
197+
| mithril-signer | mithril-signer:$MITHRIL_IMAGE_ID | ghcr.io/input-output-hk/mithril-signer:$MITHRIL_IMAGE_ID |
198+
| mithril-client | mithril-client:$MITHRIL_IMAGE_ID | ghcr.io/input-output-hk/mithril-client:$MITHRIL_IMAGE_ID |
199+
EOF
200+
144201
- name: List packaged assets
145202
shell: bash
146203
run: ls -al ./package

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,10 @@ jobs:
503503
- name: Checkout
504504
uses: actions/checkout@v4
505505

506+
- name: Get short SHA
507+
id: slug
508+
run: echo "sha8=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
509+
506510
- name: Set up QEMU
507511
uses: docker/setup-qemu-action@v3
508512

@@ -523,7 +527,7 @@ jobs:
523527
images: ${{ env.REGISTRY }}/${{ env.PACKAGE }}
524528
tags: |
525529
unstable
526-
type=raw,value=${{ github.base_ref || github.ref_name }}-{{sha}}
530+
type=raw,value=${{ github.base_ref || github.ref_name }}-${{ steps.slug.outputs.sha8 }}
527531
528532
- name: Download built artifacts (Linux-X64)
529533
uses: actions/download-artifact@v4
@@ -684,7 +688,7 @@ jobs:
684688
- name: Prepare distribution package
685689
uses: ./.github/workflows/actions/prepare-distribution
686690
with:
687-
version-name: unstable-${{ steps.slug.outputs.sha8 }}
691+
tag: unstable
688692
download-url-base: ${{ github.server_url }}/${{ github.repository }}/releases/download/unstable
689693
gpg-secret-key: ${{ secrets.GPG_SECRET_KEY }}
690694
compatibility-table: '{ "release-mainnet": "⛔", "release-preprod": "⛔", "pre-release-preview": "⛔", "testing-preview": "✔" }'

.github/workflows/pre-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
- name: Prepare distribution package
8989
uses: ./.github/workflows/actions/prepare-distribution
9090
with:
91-
version-name: ${{ github.ref_name }}
91+
tag: ${{ github.ref_name }}
9292
download-url-base: ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}
9393
gpg-secret-key: ${{ secrets.GPG_SECRET_KEY }}
9494
compatibility-table: '{ "release-mainnet": "⛔", "release-preprod": "⛔", "pre-release-preview": "✔", "testing-preview": "⛔" }'
@@ -130,6 +130,10 @@ jobs:
130130
- name: Checkout
131131
uses: actions/checkout@v4
132132

133+
- name: Get short SHA
134+
id: slug
135+
run: echo "sha8=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
136+
133137
- name: Set up QEMU
134138
uses: docker/setup-qemu-action@v3
135139

@@ -150,7 +154,7 @@ jobs:
150154
images: ${{ env.REGISTRY }}/${{ env.PACKAGE }}
151155
tags: |
152156
pre-release
153-
type=raw,value=${{ github.ref_name }}-{{sha}}
157+
type=raw,value=${{ github.ref_name }}-${{ steps.slug.outputs.sha8 }}
154158
155159
- name: Download built artifacts (Linux-x64)
156160
uses: dawidd6/action-download-artifact@v6

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
- name: Checkout
3232
uses: actions/checkout@v4
3333

34+
- name: Get short SHA
35+
id: slug
36+
run: echo "sha8=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
37+
3438
- name: Set up QEMU
3539
uses: docker/setup-qemu-action@v3
3640

@@ -51,7 +55,7 @@ jobs:
5155
images: ${{ env.REGISTRY }}/${{ env.PACKAGE }}
5256
tags: |
5357
latest
54-
type=raw,value=${{ github.ref_name }}-{{sha}}
58+
type=raw,value=${{ github.ref_name }}-${{ steps.slug.outputs.sha8 }}
5559
5660
- name: Download built artifacts (Linux-x64)
5761
uses: dawidd6/action-download-artifact@v6

0 commit comments

Comments
 (0)