Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo committed Jan 29, 2024
1 parent e781ee7 commit 6921d06
Showing 1 changed file with 85 additions and 85 deletions.
170 changes: 85 additions & 85 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ jobs:
echo "commit-hash=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT
echo "prerelease=${{ contains(github.event.inputs.tag, '-') }}" >> $GITHUB_OUTPUT
$SCRIPTS_PATH/build-runner.sh $GITHUB_SHA $build_timestamp
- name: Build Nethermind.Cli
run: $SCRIPTS_PATH/build-cli.sh $GITHUB_SHA ${{ steps.build-runner.outputs.build-timestamp }}
- name: Bundle Nethermind launcher
run: |
json=$(curl -s https://api.github.com/repos/nethermindeth/nethermind.launcher/releases/latest)
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-x64"))')
curl -sSL $url -o $PUB_DIR/linux-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-arm64"))')
curl -sSL $url -o $PUB_DIR/linux-arm64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("windows-x64"))')
curl -sSL $url -o $PUB_DIR/win-x64/nethermind-launcher.exe
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-x64"))')
curl -sSL $url -o $PUB_DIR/osx-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-arm64"))')
curl -sSL $url -o $PUB_DIR/osx-arm64/nethermind-launcher
# - name: Build Nethermind.Cli
# run: $SCRIPTS_PATH/build-cli.sh $GITHUB_SHA ${{ steps.build-runner.outputs.build-timestamp }}
# - name: Bundle Nethermind launcher
# run: |
# json=$(curl -s https://api.github.com/repos/nethermindeth/nethermind.launcher/releases/latest)
# url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-x64"))')
# curl -sSL $url -o $PUB_DIR/linux-x64/nethermind-launcher
# url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-arm64"))')
# curl -sSL $url -o $PUB_DIR/linux-arm64/nethermind-launcher
# url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("windows-x64"))')
# curl -sSL $url -o $PUB_DIR/win-x64/nethermind-launcher.exe
# url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-x64"))')
# curl -sSL $url -o $PUB_DIR/osx-x64/nethermind-launcher
# url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-arm64"))')
# curl -sSL $url -o $PUB_DIR/osx-arm64/nethermind-launcher
- name: Archive packages
id: archive
env:
Expand Down Expand Up @@ -98,21 +98,21 @@ jobs:
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}/*ref-assemblies*
retention-days: ${{ env.PACKAGE_RETENTION }}

approval:
name: Approve
runs-on: ubuntu-latest
needs: build
environment:
name: Releases
url: https://github.com/NethermindEth/nethermind/releases/tag/${{ github.event.inputs.tag }}
steps:
- name: Wait for approval
run: echo "Waiting for approval..."
# approval:
# name: Approve
# runs-on: ubuntu-latest
# needs: build
# environment:
# name: Releases
# url: https://github.com/NethermindEth/nethermind/releases/tag/${{ github.event.inputs.tag }}
# steps:
# - name: Wait for approval
# run: echo "Waiting for approval..."

publish-github:
name: Publish to GitHub
runs-on: ubuntu-latest
needs: [approval, build]
needs: [build]
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v4
Expand All @@ -131,63 +131,63 @@ jobs:
rm -rf $GITHUB_WORKSPACE/$PACKAGE_DIR/*/
$SCRIPTS_PATH/publish-github.sh
publish-downloads:
name: Publish to Downloads page
runs-on: ubuntu-latest
needs: [approval, build]
if: needs.build.outputs.prerelease == 'false'
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}
- name: Configure GPG Key
run: |
mkdir -p ~/.gnupg/
printf "${{ secrets.GPG_SIGNING_KEY }}" | base64 --decode > ~/.gnupg/private.key
gpg --import --no-tty --batch --yes ~/.gnupg/private.key
- name: Publish packages to Downloads page
env:
DOWNLOADS_PAGE: ${{ secrets.DOWNLOADS_API_KEY }}
PACKAGE_PREFIX: ${{ needs.build.outputs.package-prefix }}
PASS: ${{ secrets.GPG_PASSWORD }}
run: |
cp $GITHUB_WORKSPACE/$PACKAGE_DIR/**/*.zip $GITHUB_WORKSPACE/$PACKAGE_DIR
rm -rf $GITHUB_WORKSPACE/$PACKAGE_DIR/*/
$SCRIPTS_PATH/publish-downloads.sh
# publish-downloads:
# name: Publish to Downloads page
# runs-on: ubuntu-latest
# needs: [approval, build]
# if: needs.build.outputs.prerelease == 'false'
# steps:
# - name: Check out Nethermind repository
# uses: actions/checkout@v4
# - name: Download artifacts
# uses: actions/download-artifact@v4
# with:
# path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}
# - name: Configure GPG Key
# run: |
# mkdir -p ~/.gnupg/
# printf "${{ secrets.GPG_SIGNING_KEY }}" | base64 --decode > ~/.gnupg/private.key
# gpg --import --no-tty --batch --yes ~/.gnupg/private.key
# - name: Publish packages to Downloads page
# env:
# DOWNLOADS_PAGE: ${{ secrets.DOWNLOADS_API_KEY }}
# PACKAGE_PREFIX: ${{ needs.build.outputs.package-prefix }}
# PASS: ${{ secrets.GPG_PASSWORD }}
# run: |
# cp $GITHUB_WORKSPACE/$PACKAGE_DIR/**/*.zip $GITHUB_WORKSPACE/$PACKAGE_DIR
# rm -rf $GITHUB_WORKSPACE/$PACKAGE_DIR/*/
# $SCRIPTS_PATH/publish-downloads.sh

publish-docker:
name: Publish to Docker Hub
runs-on: ubuntu-latest
needs: [approval, build]
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push image to Docker Hub
run: |
image=nethermind/nethermind
docker buildx build --platform=linux/amd64,linux/arm64 -f Dockerfile \
${{ needs.build.outputs.prerelease == 'false' && '-t $image:latest' || '' }} \
-t "$image:${{ github.event.inputs.tag }}" \
--build-arg BUILD_TIMESTAMP=${{ needs.build.outputs.build-timestamp }} \
--build-arg CI=$CI \
--build-arg COMMIT_HASH=$GITHUB_SHA \
. --push
- name: Trigger DAppNode build
if: needs.build.outputs.prerelease == 'false'
run: |
curl -s -X POST https://api.github.com/repos/$GITHUB_REPOSITORY/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" \
-d '{"event_type":"dappnode","client_payload":{"tag":"${{ github.event.inputs.tag }}"}}' \
-u "${{ secrets.REPOSITORY_DISPATCH_TOKEN }}"
# publish-docker:
# name: Publish to Docker Hub
# runs-on: ubuntu-latest
# needs: [approval, build]
# steps:
# - name: Check out Nethermind repository
# uses: actions/checkout@v4
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Log in to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
# - name: Build and push image to Docker Hub
# run: |
# image=nethermind/nethermind
# docker buildx build --platform=linux/amd64,linux/arm64 -f Dockerfile \
# ${{ needs.build.outputs.prerelease == 'false' && '-t $image:latest' || '' }} \
# -t "$image:${{ github.event.inputs.tag }}" \
# --build-arg BUILD_TIMESTAMP=${{ needs.build.outputs.build-timestamp }} \
# --build-arg CI=$CI \
# --build-arg COMMIT_HASH=$GITHUB_SHA \
# . --push
# - name: Trigger DAppNode build
# if: needs.build.outputs.prerelease == 'false'
# run: |
# curl -s -X POST https://api.github.com/repos/$GITHUB_REPOSITORY/dispatches \
# -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" \
# -d '{"event_type":"dappnode","client_payload":{"tag":"${{ github.event.inputs.tag }}"}}' \
# -u "${{ secrets.REPOSITORY_DISPATCH_TOKEN }}"

0 comments on commit 6921d06

Please sign in to comment.