Skip to content

checkout the code... #39

checkout the code...

checkout the code... #39

Workflow file for this run

name: Release
on:
push:
tags:
# We match on all tags and filter them later
- "**"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
mater_cli_check_version:
runs-on: self-hosted
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'mater-cli-v')
steps:
- uses: actions/[email protected]
- id: check-version
name: Check version match
run: |
# used later in the build for docker tagging
PACKAGE_VERSION="$(cargo metadata --no-deps --color never --format-version 1 --locked |
jq -r '.packages[] | select(.name == "mater-cli") | .version')"
# used for checking the tag
PACKAGE_VERSION_WITH_NAME=$(echo "mater-cli-v$PACKAGE_VERSION")
if [[ "$PACKAGE_VERSION_WITH_NAME" != "$GITHUB_REF_NAME" ]]; then
exit 1;
fi
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
outputs:
package-version: ${{ steps.check-version.outputs.PACKAGE_VERSION }}
mater_cli_build_linux:
runs-on: self-hosted
needs:
- mater_cli_check_version
steps:
- uses: actions/[email protected]
- 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"
- uses: actions/upload-artifact@v4
with:
name: mater-cli-linux-${{ runner.arch }}
path: target/release/mater-cli
retention-days: 1
mater_cli_build_macos:
runs-on:
- macos-13 # x86
- macos-14 # ARM
needs:
- mater_cli_check_version
steps:
- uses: actions/[email protected]
- uses: dtolnay/[email protected]
with:
targets: wasm32-unknown-unknown
- name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package mater-cli
- uses: actions/upload-artifact@v4
with:
name: mater-cli-macos-${{ runner.arch }}
path: target/release/mater-cli
retention-days: 1
# mater_cli_build_docker:
# runs-on: self-hosted
# needs:
# - mater_cli_check_version
# permissions:
# packages: write
# steps:
# - uses: actions/[email protected]
# - name: Login to Github Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and publish image
# run: |
# docker build \
# --build-arg VCS_REF="$(git rev-parse HEAD)" \
# --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
# --tag ghcr.io/eigerco/mater-cli:"${{ needs.mater_cli_check_version.outputs.package-version }}" \
# --file ./docker/dockerfiles/mater-cli.Dockerfile \
# .
# docker push ghcr.io/eigerco/mater-cli:"${{ needs.mater_cli_check_version.outputs.package-version }}"
mater_cli_release:
needs:
- mater_cli_check_version
- mater_cli_build_linux
- mater_cli_build_macos
# - mater_cli_build_docker
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- id: download-artifacts
uses: actions/download-artifact@v4
- id: calculate-sha256
run: |
cd ${{ steps.download-artifacts.outputs.download-path }}
echo "LINUX_X64_SHA256=${sha256sum mater-cli-linux-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_X64_SHA256=${sha256sum mater-cli-macos-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_ARM64_SHA256=${sha256sum mater-cli-macos-arm64}" >> "$GITHUB_OUTPUT"
- name: Perform release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/mater-cli?tag=${{ needs.mater_cli_check_version.outputs.package-version }}
| Binary | SHA256 |
| ----------------------- | -------------------------------------------------------------------- |
| `mater-cli-linux-x64` | `${{ steps.calculate-sha256.outputs.LINUX_x64_SHA256 }}` |
| `mater-cli-macos-x64` | `${{ steps.calculate-sha256.outputs.MACOS_x64_SHA256 }}` |
| `mater-cli-macos-arm64` | `${{ steps.calculate-sha256.outputs.MACOS_ARM64_SHA256 }}` |
files: |
${{steps.download-artifacts.outputs.download-path}}/mater-cli-*
storagext_cli_check_version:
runs-on: self-hosted
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'storagext-cli-v')
steps:
- uses: actions/[email protected]
- id: check-version
name: Check version match
run: |
# used later in the build for docker tagging
PACKAGE_VERSION="$(cargo metadata --no-deps --color never --format-version 1 --locked |
jq -r '.packages[] | select(.name == "storagext-cli") | .version')"
# used for checking the tag
PACKAGE_VERSION_WITH_NAME=$(echo "storagext-cli-v$PACKAGE_VERSION")
if [[ "$PACKAGE_VERSION_WITH_NAME" != "$GITHUB_REF_NAME" ]]; then
exit 1;
fi
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
outputs:
package-version: ${{ steps.check-version.outputs.PACKAGE_VERSION }}
storagext_cli_build_linux:
runs-on: self-hosted
needs:
- storagext_cli_check_version
steps:
- uses: actions/[email protected]
- 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"
- uses: actions/upload-artifact@v4
with:
name: storagext-cli-linux-${{ runner.arch }}
path: target/release/storagext-cli
retention-days: 1
storagext_cli_build_macos:
runs-on:
- macos-13 # x86
- macos-14 # ARM
needs:
- storagext_cli_check_version
steps:
- uses: actions/[email protected]
- uses: dtolnay/[email protected]
with:
targets: wasm32-unknown-unknown
- name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package storagext-cli
- uses: actions/upload-artifact@v4
with:
name: storagext-cli-macos-${{ runner.arch }}
path: target/release/storagext-cli
retention-days: 1
storagext_cli_build_docker:
runs-on: self-hosted
needs:
- storagext_cli_check_version
permissions:
packages: write
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'storagext-cli-v')
steps:
- uses: actions/[email protected]
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish image
run: |
docker build \
--build-arg VCS_REF="$(git rev-parse HEAD)" \
--build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--tag ghcr.io/eigerco/storagext-cli:"${{ needs.storagext_cli_check_version.outputs.package-version }}" \
--file ./docker/dockerfiles/storagext-cli.Dockerfile \
.
docker push ghcr.io/eigerco/storagext-cli:"${{ needs.storagext_cli_check_version.outputs.package-version }}"
storagext_cli_release:
needs:
- storagext_cli_check_version
- storagext_cli_build_linux
- storagext_cli_build_macos
- storagext_cli_build_docker
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- id: download-artifacts
uses: actions/download-artifact@v4
- id: calculate-sha256
run: |
cd ${{ steps.download-artifacts.outputs.download-path }}
echo "LINUX_X64_SHA256=${sha256sum storagext-cli-linux-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_X64_SHA256=${sha256sum storagext-cli-macos-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_ARM64_SHA256=${sha256sum storagext-cli-macos-arm64}" >> "$GITHUB_OUTPUT"
- name: Perform release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/storagext-cli?tag=${{ needs.storagext_cli_check_version.outputs.package-version }}
| Binary | SHA256 |
| --------------------------- | -------------------------------------------------------------------- |
| `storagext-cli-linux-x64` | `${{ steps.calculate-sha256.outputs.LINUX_x64_SHA256 }}` |
| `storagext-cli-macos-x64` | `${{ steps.calculate-sha256.outputs.MACOS_x64_SHA256 }}` |
| `storagext-cli-macos-arm64` | `${{ steps.calculate-sha256.outputs.MACOS_ARM64_SHA256 }}` |
files: |
${{steps.download-artifacts.outputs.download-path}}/storagext-cli-*
polka_storage_node_check_version:
runs-on: self-hosted
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'polka-storage-node-v')
steps:
- uses: actions/[email protected]
- id: check-version
name: Check version match
run: |
# used later in the build for docker tagging
PACKAGE_VERSION="$(cargo metadata --no-deps --color never --format-version 1 --locked |
jq -r '.packages[] | select(.name == "polka-storage-node") | .version')"
# used for checking the tag
PACKAGE_VERSION_WITH_NAME=$(echo "polka-storage-node-v$PACKAGE_VERSION")
if [[ "$PACKAGE_VERSION_WITH_NAME" != "$GITHUB_REF_NAME" ]]; then
exit 1;
fi
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
outputs:
package-version: ${{ steps.check-version.outputs.PACKAGE_VERSION }}
polka_storage_node_build_linux:
runs-on: self-hosted
needs:
- polka_storage_node_check_version
steps:
- uses: actions/[email protected]
- 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"
- uses: actions/upload-artifact@v4
with:
name: polka-storage-node-linux-${{ runner.arch }}
path: target/release/polka-storage-node
retention-days: 1
polka_storage_node_build_macos:
runs-on:
- macos-13 # x86
- macos-14 # ARM
needs:
- polka_storage_node_check_version
steps:
- uses: actions/[email protected]
- uses: dtolnay/[email protected]
with:
targets: wasm32-unknown-unknown
- name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-node
- uses: actions/upload-artifact@v4
with:
name: polka-storage-node-macos-${{ runner.arch }}
path: target/release/polka-storage-node
retention-days: 1
polka_storage_node_build_docker:
runs-on: self-hosted
needs:
- polka_storage_node_check_version
permissions:
packages: write
steps:
- uses: actions/[email protected]
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish image
run: |
docker build \
--build-arg VCS_REF="$(git rev-parse HEAD)" \
--build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--tag ghcr.io/eigerco/polka-storage-node:"${{ needs.polka_storage_node_check_version.outputs.package-version }}" \
--file ./docker/dockerfiles/polka-storage-node.Dockerfile \
.
docker push ghcr.io/eigerco/polka-storage-node:"${{ needs.polka_storage_node_check_version.outputs.package-version }}"
polka_storage_node_release:
needs:
- polka_storage_node_check_version
- polka_storage_node_build_linux
- polka_storage_node_build_macos
- polka_storage_node_build_docker
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- id: download-artifacts
uses: actions/download-artifact@v4
- id: calculate-sha256
run: |
cd ${{ steps.download-artifacts.outputs.download-path }}
echo "LINUX_X64_SHA256=${sha256sum polka-storage-node-linux-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_X64_SHA256=${sha256sum polka-storage-node-macos-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_ARM64_SHA256=${sha256sum polka-storage-node-macos-arm64}" >> "$GITHUB_OUTPUT"
- name: Perform release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/polka-storage-node?tag=${{ needs.polka_storage_node_check_version.outputs.package-version }}
| Binary | SHA256 |
| -------------------------------- | ---------------------------------------------------------- |
| `polka-storage-node-linux-x64` | `${{ steps.calculate-sha256.outputs.LINUX_x64_SHA256 }}` |
| `polka-storage-node-macos-x64` | `${{ steps.calculate-sha256.outputs.MACOS_x64_SHA256 }}` |
| `polka-storage-node-macos-arm64` | `${{ steps.calculate-sha256.outputs.MACOS_ARM64_SHA256 }}` |
files: |
${{steps.download-artifacts.outputs.download-path}}/polka-storage-node-*
polka_storage_provider_client_check_version:
runs-on: self-hosted
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'polka-storage-provider-client-v')
steps:
- uses: actions/[email protected]
- id: check-version
name: Check version match
run: |
# used later in the build for docker tagging
PACKAGE_VERSION="$(cargo metadata --no-deps --color never --format-version 1 --locked |
jq -r '.packages[] | select(.name == "polka-storage-provider-client") | .version')"
# used for checking the tag
PACKAGE_VERSION_WITH_NAME=$(echo "polka-storage-provider-client-v$PACKAGE_VERSION")
if [[ "$PACKAGE_VERSION_WITH_NAME" != "$GITHUB_REF_NAME" ]]; then
exit 1;
fi
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
outputs:
package-version: ${{ steps.check-version.outputs.PACKAGE_VERSION }}
polka_storage_provider_client_build_linux:
runs-on: self-hosted
needs:
- polka_storage_provider_client_check_version
steps:
- uses: actions/[email protected]
- 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"
- uses: actions/upload-artifact@v4
with:
name: polka-storage-provider-client-linux-${{ runner.arch }}
path: target/release/polka-storage-provider-client
retention-days: 1
polka_storage_provider_client_build_macos:
runs-on:
- macos-13 # x86
- macos-14 # ARM
needs:
- polka_storage_provider_client_check_version
steps:
- uses: actions/[email protected]
- uses: dtolnay/[email protected]
with:
targets: wasm32-unknown-unknown
- name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-provider-client
- uses: actions/upload-artifact@v4
with:
name: polka-storage-provider-client-macos-${{ runner.arch }}
path: target/release/polka-storage-provider-client
retention-days: 1
polka_storage_provider_client_build_docker:
runs-on: self-hosted
needs:
- polka_storage_provider_client_check_version
permissions:
packages: write
steps:
- uses: actions/[email protected]
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish image
run: |
docker build \
--build-arg VCS_REF="$(git rev-parse HEAD)" \
--build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--tag ghcr.io/eigerco/polka-storage-provider-client:"${{ needs.polka_storage_provider_client_check_version.outputs.package-version }}" \
--file ./docker/dockerfiles/polka-storage-provider-client.Dockerfile \
.
docker push ghcr.io/eigerco/polka-storage-provider-client:"${{ needs.polka_storage_provider_client_check_version.outputs.package-version }}"
polka_storage_provider_client_release:
needs:
- polka_storage_provider_client_check_version
- polka_storage_provider_client_build_linux
- polka_storage_provider_client_build_macos
- polka_storage_provider_client_build_docker
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- id: download-artifacts
uses: actions/download-artifact@v4
- id: calculate-sha256
run: |
cd ${{ steps.download-artifacts.outputs.download-path }}
echo "LINUX_X64_SHA256=${sha256sum polka-storage-provider-client-linux-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_X64_SHA256=${sha256sum polka-storage-provider-client-macos-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_ARM64_SHA256=${sha256sum polka-storage-provider-client-macos-arm64}" >> "$GITHUB_OUTPUT"
- name: Perform release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/polka-storage-provider-client?tag=${{ needs.polka_storage_provider_client_check_version.outputs.package-version }}
| Binary | SHA256 |
| ------------------------------------------- | ---------------------------------------------------------- |
| `polka-storage-provider-client-linux-x64` | `${{ steps.calculate-sha256.outputs.LINUX_x64_SHA256 }}` |
| `polka-storage-provider-client-macos-x64` | `${{ steps.calculate-sha256.outputs.MACOS_x64_SHA256 }}` |
| `polka-storage-provider-client-macos-arm64` | `${{ steps.calculate-sha256.outputs.MACOS_ARM64_SHA256 }}` |
files: |
${{steps.download-artifacts.outputs.download-path}}/polka-storage-provider-client-*
polka_storage_provider_server_check_version:
runs-on: self-hosted
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'polka-storage-provider-server-v')
steps:
- uses: actions/[email protected]
- id: check-version
name: Check version match
run: |
# used later in the build for docker tagging
PACKAGE_VERSION="$(cargo metadata --no-deps --color never --format-version 1 --locked |
jq -r '.packages[] | select(.name == "polka-storage-provider-server") | .version')"
# used for checking the tag
PACKAGE_VERSION_WITH_NAME=$(echo "polka-storage-provider-server-v$PACKAGE_VERSION")
if [[ "$PACKAGE_VERSION_WITH_NAME" != "$GITHUB_REF_NAME" ]]; then
exit 1;
fi
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
outputs:
package-version: ${{ steps.check-version.outputs.PACKAGE_VERSION }}
polka_storage_provider_server_build_linux:
runs-on: self-hosted
needs:
- polka_storage_provider_server_check_version
steps:
- uses: actions/[email protected]
- 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"
- uses: actions/upload-artifact@v4
with:
name: polka-storage-provider-server-linux-${{ runner.arch }}
path: target/release/polka-storage-provider-server
retention-days: 1
polka_storage_provider_server_build_macos:
runs-on:
- macos-13 # x86
- macos-14 # ARM
needs:
- polka_storage_provider_server_check_version
steps:
- uses: actions/[email protected]
- uses: dtolnay/[email protected]
with:
targets: wasm32-unknown-unknown
- name: Build in release mode
run: |
RUSTFLAGS="-D warnings" cargo build --release --locked --package polka-storage-providerserver-
- uses: actions/upload-artifact@v4
with:
name: polka-storage-provider-server-macos-${{ runner.arch }}
path: target/release/polka-storage-provider-server
retention-days: 1
polka_storage_provider_server_build_docker:
runs-on: self-hosted
needs:
- polka_storage_provider_server_check_version
permissions:
packages: write
steps:
- uses: actions/[email protected]
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish image
run: |
docker build \
--build-arg VCS_REF="$(git rev-parse HEAD)" \
--build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--tag ghcr.io/eigerco/polka-storage-provider-server:"${{ needs.polka_storage_provider_server_check_version.outputs.package-version }}" \
--file ./docker/dockerfiles/polka-storage-provider-server.Dockerfile \
.
docker push ghcr.io/eigerco/polka-storage-provider-server:"${{ needs.polka_storage_provider_server_check_version.outputs.package-version }}"
polka_storage_provider_server_release:
needs:
- polka_storage_provider_server_check_version
- polka_storage_provider_server_build_linux
- polka_storage_provider_server_build_macos
- polka_storage_provider_server_build_docker
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- id: download-artifacts
uses: actions/download-artifact@v4
- id: calculate-sha256
run: |
cd ${{ steps.download-artifacts.outputs.download-path }}
echo "LINUX_X64_SHA256=${sha256sum polka-storage-provider-server-linux-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_X64_SHA256=${sha256sum polka-storage-provider-server-macos-x64}" >> "$GITHUB_OUTPUT"
echo "MACOS_ARM64_SHA256=${sha256sum polka-storage-provider-server-macos-arm64}" >> "$GITHUB_OUTPUT"
- name: Perform release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/polka-storage-provider-server?tag=${{ needs.polka_storage_provider_server_check_version.outputs.package-version }}
| Binary | SHA256 |
| ------------------------------------------- | ---------------------------------------------------------- |
| `polka-storage-provider-server-linux-x64` | `${{ steps.calculate-sha256.outputs.LINUX_x64_SHA256 }}` |
| `polka-storage-provider-server-macos-x64` | `${{ steps.calculate-sha256.outputs.MACOS_x64_SHA256 }}` |
| `polka-storage-provider-server-macos-arm64` | `${{ steps.calculate-sha256.outputs.MACOS_ARM64_SHA256 }}` |
files: |
${{steps.download-artifacts.outputs.download-path}}/polka-storage-provider-server-*