Skip to content

Release

Release #43

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
standalone:
name: Standalone Build
if: startsWith(github.ref, 'refs/heads/release/')
uses: ./.github/workflows/standalone.yml
build:
name: Standalone Pack/Release/Publish
if: startsWith(github.ref, 'refs/heads/release/')
needs: [standalone]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Nerdbank.GitVersioning
uses: dotnet/[email protected]
id: nbgv
- name: Update submodule
run: |
git submodule update --init --recursive --remote
- name: Install dependencies
run: dotnet restore neo-express.sln
- name: Pack NeoExpress
run: dotnet pack neo-express.sln --output ./dist --configuration Release --no-restore --verbosity normal
# - name: Download Express Files (Standalone)
# uses: actions/download-artifact@v3
# with:
# name: ${{ steps.nbgv.outputs.NuGetPackageVersion }}
# path: ./out
- name: Get Cache Files (osx-x64)
uses: actions/cache@v3
with:
path: /tmp/dist/*
key: osx-x64
- name: Get Cache Files (osx-arm64)
uses: actions/cache@v3
with:
path: /tmp/dist/*
key: osx-arm64
- name: Get Cache Files (linux-x64)
uses: actions/cache@v3
with:
path: /tmp/dist/*
key: linux-x64
- name: Get Cache Files (linux-arm64)
uses: actions/cache@v3
with:
path: /tmp/dist/*
key: linux-arm64
- name: Get Cache Files (linux-musl-arm64)
uses: actions/cache@v3
with:
path: /tmp/dist/*
key: linux-musl-arm64
- name: Get Cache Files (win-x64)
uses: actions/cache@v3
with:
path: /tmp/dist/*
key: win-x64
- name: Get Cache Files (win-arm64)
uses: actions/cache@v3
with:
path: /tmp/dist/*
key: win-arm64
- name: Create Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ steps.nbgv.outputs.PrereleaseVersion != '' }}
title: ${{ steps.nbgv.outputs.NuGetPackageVersion }}
automatic_release_tag: ${{ steps.nbgv.outputs.NuGetPackageVersion }}
files: |
/tmp/dist/*
- name: Push Neo.Express Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.Express.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Push Neo.Trace Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.Trace.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Push Blockchain-toolkit-library Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.BlockchainToolkit.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Push Neo.Assertions Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.Assertions.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Push Neo.BuildTasks Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.BuildTasks.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Push Neo.Collector Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.Collector.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Push Neo.Test.Runner Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.Test.Runner.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Neo.Test.Harness Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.Test.Harness.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Push Neo.WorkNet Nuget.org
run: dotnet nuget push ${{ format('./dist/Neo.WorkNet.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json