Build preview packages and publish them to nuget #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build a preview and release it to Nuget | |
on: workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Install WASI Workload | |
run: dotnet workload install wasi-experimental # required to build iOS projects | |
- name: Install WASM Workload | |
run: dotnet workload install wasm-tools | |
- name: Install Android Workload | |
run: dotnet workload install android | |
- name: define version suffix | |
run: echo "VERSIONSUFFIX=Preview-$(date +'%Y%m%d-%H%M')" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c Release --version-suffix ${{ env.VERSIONSUFFIX }} | |
# - name: Test | |
# run: dotnet test -c Release --no-build | |
- name: Pack nugets | |
run: dotnet pack -c Release --no-build --output . | |
# - name: Push to NuGet | |
# run: dotnet nuget push "*.nupkg" --api-key ${{secrets.InteropTypes_PublishToNuget}} --source https://api.nuget.org/v3/index.json | |
# - name: unlist | |
# run: dotnet nuget delete |