Skip to content

Build, Pack & Publish #58

Build, Pack & Publish

Build, Pack & Publish #58

Workflow file for this run

name: Build, Pack & Publish
on:
release:
types: [published]
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Get the sources
uses: actions/checkout@v2
- name: Extract release notes
run: |
git log --pretty=format:'%s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES.txt
- name: Run the build script
shell : bash
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
dotnet tool install Cake.Tool --version 1.1.0
dotnet tool restore
sh -c "$(curl -sSfL https://release.solana.com/v1.14.11/install)"
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
solana-test-validator -u m -c whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc -c CtXfPzz36dH5Ws4UYKZvrQ1Xqzn42ecDW6y8NKuiN8nD -c metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s -c PwDiXFxQsGra4sFFTT8r1QWRMd4vfumiWC1jfWNfdYT --mint 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG > /dev/null &
sleep 5
dotnet cake --target=Pack --verbosity=verbose
dotnet nuget push artifacts/packages/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate