Skip to content

Commit

Permalink
ci: automatically add hashes to the release (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmg-duarte authored Nov 22, 2024
1 parent cae276c commit 6bf63e9
Showing 1 changed file with 45 additions and 10 deletions.
55 changes: 45 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ jobs:
# make the version available as a "checked" output in later steps
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Build in release mode
run: RUSTFLAGS="-D warnings" cargo build --release --locked --package mater-cli
- id: build-release
name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package mater-cli
echo "PACKAGE_SHA256=$(sha256sum target/release/mater-cli | sed 's/\(.*\) .*/\1/')" >> "$GITHUB_OUTPUT"
- name: Login to Github Container Registry
uses: docker/login-action@v3
Expand All @@ -82,6 +85,10 @@ jobs:
tag_name: ${{ github.ref_name }} # set the name of the release the tag
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/mater-cli/?tag=${{ steps.check-version.outputs.PACKAGE_VERSION }}
| Binary | SHA256 |
| ------------------------ | --------------------------------------------------- |
| `${{ github.ref_name }}` | `${{ steps.build-release.outputs.PACKAGE_SHA256 }}` |
files: |
target/release/mater-cli
Expand Down Expand Up @@ -114,8 +121,11 @@ jobs:
# make the version available as a "checked" output in later steps
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Build in release mode
run: RUSTFLAGS="-D warnings" cargo build --release --locked --package storagext-cli
- id: build-release
name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package storagext-cli
echo "PACKAGE_SHA256=$(sha256sum target/release/storagext-cli | sed 's/\(.*\) .*/\1/')" >> "$GITHUB_OUTPUT"
- name: Login to Github Container Registry
uses: docker/login-action@v3
Expand All @@ -142,6 +152,10 @@ jobs:
tag_name: ${{ github.ref_name }} # set the name of the release the tag
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/storagext-cli/?tag=${{ steps.check-version.outputs.PACKAGE_VERSION }}
| Binary | SHA256 |
| ------------------------ | --------------------------------------------------- |
| `${{ github.ref_name }}` | `${{ steps.build-release.outputs.PACKAGE_SHA256 }}` |
files: |
target/release/storagext-cli
Expand Down Expand Up @@ -174,8 +188,11 @@ jobs:
# make the version available as a "checked" output in later steps
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Build in release mode
run: RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-node --features polka-storage-runtime/testnet
- id: build-release
name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-node --features polka-storage-runtime/testnet
echo "PACKAGE_SHA256=$(sha256sum target/release/polka-storage-node | sed 's/\(.*\) .*/\1/')" >> "$GITHUB_OUTPUT"
- name: Login to Github Container Registry
uses: docker/login-action@v3
Expand All @@ -202,6 +219,10 @@ jobs:
tag_name: ${{ github.ref_name }} # set the name of the release the tag
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/polka-storage-node/?tag=${{ steps.check-version.outputs.PACKAGE_VERSION }}
| Binary | SHA256 |
| ------------------------ | --------------------------------------------------- |
| `${{ github.ref_name }}` | `${{ steps.build-release.outputs.PACKAGE_SHA256 }}` |
files: |
target/release/polka-storage-node
Expand Down Expand Up @@ -234,8 +255,11 @@ jobs:
# make the version available as a "checked" output in later steps
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Build in release mode
run: RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-provider-server
- id: build-release
name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-provider-server
echo "PACKAGE_SHA256=$(sha256sum target/release/polka-storage-provider-server | sed 's/\(.*\) .*/\1/')" >> "$GITHUB_OUTPUT"
- name: Login to Github Container Registry
uses: docker/login-action@v3
Expand All @@ -262,6 +286,10 @@ jobs:
tag_name: ${{ github.ref_name }} # set the name of the release the tag
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/polka-storage-provider-server/?tag=${{ steps.check-version.outputs.PACKAGE_VERSION }}
| Binary | SHA256 |
| ------------------------ | --------------------------------------------------- |
| `${{ github.ref_name }}` | `${{ steps.build-release.outputs.PACKAGE_SHA256 }}` |
files: |
target/release/polka-storage-provider-server
Expand Down Expand Up @@ -294,8 +322,11 @@ jobs:
# make the version available as a "checked" output in later steps
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Build in release mode
run: RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-provider-client
- id: build-release
name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-provider-client
echo "PACKAGE_SHA256=$(sha256sum target/release/polka-storage-provider-client | sed 's/\(.*\) .*/\1/')" >> "$GITHUB_OUTPUT"
- name: Login to Github Container Registry
uses: docker/login-action@v3
Expand All @@ -322,5 +353,9 @@ jobs:
tag_name: ${{ github.ref_name }} # set the name of the release the tag
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/polka-storage-provider-client/?tag=${{ steps.check-version.outputs.PACKAGE_VERSION }}
| Binary | SHA256 |
| ------------------------ | --------------------------------------------------- |
| `${{ github.ref_name }}` | `${{ steps.build-release.outputs.PACKAGE_SHA256 }}` |
files: |
target/release/polka-storage-provider-client

0 comments on commit 6bf63e9

Please sign in to comment.