Skip to content

Commit

Permalink
Revise release build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo committed Jul 29, 2022
1 parent 3d5015f commit d21c3c8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 45 deletions.
81 changes: 40 additions & 41 deletions .github/workflows/release-nethermind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ on:
workflow_dispatch:
inputs:
tag:
description: 'The TAG of the version you want to release.'
required: false
default: 'master'
description: 'The TAG of the version you want to release'
required: true

permissions:
deployments: write
Expand All @@ -31,37 +30,37 @@ jobs:
OSX_ARM64: osx-arm64
steps:
- name: Checking out Nethermind repository
uses: actions/checkout@master
uses: actions/checkout@v3
with:
submodules: recursive
path: nethermind
ref: ${{ github.event.inputs.tag }}
fetch-depth: 0
- name: Checking out Nethermind Launcher repository
uses: actions/checkout@master
uses: actions/checkout@v3
with:
repository: NethermindEth/nethermind.launcher
path: launcher
- name: Setting up Node.js
uses: actions/setup-node@master
uses: actions/setup-node@v3
with:
node-version: "14"
- name: Setting up Build Environment
run: |
npm i pkg @vercel/ncc -g
- name: Setting up dotnet
uses: actions/setup-dotnet@v1
- name: Setting up .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
dotnet-version: 6.0.x
- name: Setting up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Setting up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Setting up Packages
run: ./nethermind/scripts/deployment/setup-packages.sh
- name: Building Runner
run: ./nethermind/scripts/deployment/build-runner.sh
run: ./nethermind/scripts/deployment/build-runner.sh ${{ github.event.inputs.tag }} ${{ github.sha }}
- name: Building Cli
run: ./nethermind/scripts/deployment/build-cli.sh
- name: Building Launcher
Expand All @@ -74,37 +73,37 @@ jobs:
mv Nethermind.Launcher ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_ARM64_RELEASE }}/Nethermind.Launcher
- name: Archiving packages
run: ./nethermind/scripts/deployment/archive-packages.sh
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v3
name: Uploading Nethermind darwin package
with:
name: nethermind-darwin-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_RELEASE }}/nethermind-darwin-amd64-*
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v3
name: Uploading Nethermind linux package
with:
name: nethermind-linux-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_RELEASE }}/nethermind-linux-amd64-*
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v3
name: Uploading Nethermind windows package
with:
name: nethermind-windows-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.WIN_RELEASE }}/nethermind-windows-amd64-*
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v3
name: Uploading Nethermind linux arm64 package
with:
name: nethermind-linux-arm64-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_ARM64_RELEASE }}/nethermind-linux-arm64-*
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v3
name: Uploading Nethermind darwin arm64 package
with:
name: nethermind-darwin-arm64-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_ARM64_RELEASE }}/nethermind-darwin-arm64-*
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v3
name: Uploading git-hash files
with:
name: nethermind-git-hash
path: ${{ env.RELEASE_DIRECTORY }}/git-*
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v3
name: Uploading update-homebrew.sh
with:
name: update-homebrew-sh
Expand All @@ -120,27 +119,27 @@ jobs:
RELEASE_DIRECTORY: /home/runner/work/nethermind/nethermind
steps:
- name: Downloading Nethermind darwin package
uses: actions/download-artifact@master
uses: actions/download-artifact@v3
with:
name: nethermind-darwin-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_RELEASE }}/
- name: Downloading Nethermind darwin arm64 package
uses: actions/download-artifact@master
uses: actions/download-artifact@v3
with:
name: nethermind-darwin-arm64-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_ARM64_RELEASE }}/
- name: Downloading git-hash files
uses: actions/download-artifact@master
uses: actions/download-artifact@v3
with:
name: nethermind-git-hash
path: ${{ env.RELEASE_DIRECTORY }}/
- name: Downloading update-homebrew script
uses: actions/download-artifact@master
uses: actions/download-artifact@v3
with:
name: update-homebrew-sh
path: ${{ env.RELEASE_DIRECTORY }}/
- name: Checkout repository
uses: actions/checkout@master
uses: actions/checkout@v3
with:
repository: NethermindEth/homebrew-nethermind
path: homebrew-nethermind
Expand Down Expand Up @@ -183,32 +182,32 @@ jobs:
OSX_ARM64_RELEASE: nethermind-osx-arm64
steps:
- name: Checking out Nethermind repository
uses: actions/checkout@master
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
path: nethermind
fetch-depth: 0
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind darwin package
with:
name: nethermind-darwin-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_RELEASE }}/
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind linux package
with:
name: nethermind-linux-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_RELEASE }}/
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind windows package
with:
name: nethermind-windows-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.WIN_RELEASE }}/
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind linux arm64 package
with:
name: nethermind-linux-arm64-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_ARM64_RELEASE }}/
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind darwin arm64 package
with:
name: nethermind-darwin-arm64-package
Expand All @@ -232,31 +231,31 @@ jobs:
OSX_ARM64_RELEASE: nethermind-osx-arm64
steps:
- name: Checking out Nethermind repository
uses: actions/checkout@master
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
path: nethermind
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind darwin package
with:
name: nethermind-darwin-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_RELEASE }}/
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind linux package
with:
name: nethermind-linux-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_RELEASE }}/
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind windows package
with:
name: nethermind-windows-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.WIN_RELEASE }}/
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind linux arm64 package
with:
name: nethermind-linux-arm64-package
path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_ARM64_RELEASE }}/
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v3
name: Downloading Nethermind darwin arm64 package
with:
name: nethermind-darwin-arm64-package
Expand All @@ -279,7 +278,7 @@ jobs:
needs: trigger-publish
steps:
- name: Checking out Nethermind repository
uses: actions/checkout@master
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
fetch-depth: 0
Expand All @@ -290,10 +289,10 @@ jobs:
echo ::set-output name=docker_username::${{ secrets.DOCKER_USERNAME }}
echo ::set-output name=docker_image::nethermind/nethermind
- name: Setting up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Setting up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Logging to Docker Hub
if: success()
env:
Expand Down Expand Up @@ -338,10 +337,10 @@ jobs:
- name: Install dependencies for PPA
run: sudo apt update > /dev/null 2>&1 && sudo apt install debhelper devscripts -y > /dev/null 2>&1
- name: Checking out Nethermind repository
uses: actions/checkout@master
uses: actions/checkout@v3
with:
path: nethermind
- name: Run publish PPA script
run: |
chmod +x ./nethermind/scripts/deployment/publish-ppa.sh
./nethermind/scripts/deployment/publish-ppa.sh
./nethermind/scripts/deployment/publish-ppa.sh
7 changes: 3 additions & 4 deletions scripts/packaging/build-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ RUNNER_PATH=nethermind/src/Nethermind/Nethermind.Runner
LINUX=linux-x64
OSX=osx-x64
WIN10=win10-x64
PUBLISH_PATH=bin/release/netcoreapp3.1
OUT=out
LIN_RELEASE=nethermind-lin-x64
OSX_RELEASE=nethermind-osx-x64
Expand All @@ -18,9 +17,9 @@ echo Nethermind Runner path: $RUNNER_PATH

rm -rf $OUT

dotnet publish -c release -r $LINUX /p:PublishSingleFile=true -o $OUT/$LIN_RELEASE
dotnet publish -c release -r $OSX /p:PublishSingleFile=true -o $OUT/$OSX_RELEASE
dotnet publish -c release -r $WIN10 /p:PublishSingleFile=true -o $OUT/$WIN_RELEASE
dotnet publish -c release -r $LINUX -p:Version=$1 -p:Commit=$2 -p:PublishSingleFile=true -o $OUT/$LIN_RELEASE
dotnet publish -c release -r $OSX -p:Version=$1 -p:Commit=$2 -p:PublishSingleFile=true -o $OUT/$OSX_RELEASE
dotnet publish -c release -r $WIN10 -p:Version=$1 -p:Commit=$2 -p:PublishSingleFile=true -o $OUT/$WIN_RELEASE

rm -rf $OUT/$LIN_RELEASE/Data
rm -rf $OUT/$LIN_RELEASE/Hive
Expand Down

0 comments on commit d21c3c8

Please sign in to comment.