v0.3.6.1-alpha #44
Workflow file for this run
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
# This is a basic workflow to help you get started with Actions | |
name: Deploy to Github NuGet | |
# Controls when the workflow will run | |
on: | |
workflow_dispatch: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
release: | |
types: [published] | |
env: | |
APP_SOLUTION_PATH: ./csharp/IotaWalletNet/IotaWalletNet.Application/IotaWalletNet.Application.csproj | |
DOMAIN_SOLUTION_PATH: ./csharp/IotaWalletNet/IotaWalletNet.Domain/IotaWalletNet.Domain.csproj | |
NUGET_PATH: ${{ github.workspace }}/nugets | |
NUGET_SRC_URL: 'https://api.nuget.org/v3/index.json' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
environment: myenv | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
working-directory: ./csharp/IotaWalletNet | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
working-directory: ./csharp/IotaWalletNet | |
- name: Test | |
run: | | |
export LD_LIBRARY_PATH="/home/runner/work/IotaWallet.NET/IotaWallet.NET/csharp/IotaWalletNet/IotaWalletNet.Main/bin/Release/net6.0/" | |
dotnet test --configuration Release --no-build --verbosity normal --logger:"console;verbosity=detailed" | |
working-directory: ./csharp/IotaWalletNet | |
- name: Get Version | |
id: version | |
uses: battila7/get-version-action@v2 | |
- name: Pack Domain Nuget | |
run: dotnet pack ${{ env.DOMAIN_SOLUTION_PATH }} -c Release /p:Version=${{ steps.version.outputs.version-without-v }} /p:PackageReleaseNotes="See https://github.com/IOTA-NET/IotaWallet.NET/releases/tag/${{ github.event.release.tag_name }}" --include-symbols --output ${{ env.NUGET_PATH }} | |
- name: Pack Application Nuget | |
run: dotnet pack ${{ env.APP_SOLUTION_PATH }} -c Release /p:Version=${{ steps.version.outputs.version-without-v }} /p:PackageReleaseNotes="See https://github.com/IOTA-NET/IotaWallet.NET/releases/tag/${{ github.event.release.tag_name }}" --include-symbols --output ${{ env.NUGET_PATH }} | |
- name: Create Domain NuGet Package Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: IotaWallet.Net.Domain | |
path: ${{ env.NUGET_PATH }}/IotaWallet.Net.Domain.${{ steps.version.outputs.version-without-v }}.nupkg | |
- name: Create Application NuGet Package Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: IotaWallet.Net | |
path: ${{ env.NUGET_PATH }}/IotaWallet.Net.${{ steps.version.outputs.version-without-v }}.nupkg | |
- name: Add Nuget Source | |
#run: dotnet nuget push ${{ env.NUGET_PATH }}\*.nupkg -s "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_AUTH_TOKEN }} --skip-duplicate --no-symbols | |
run: dotnet nuget add source --username wireless90 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/IOTA-NET/index.json" | |
- name: Push All Nugets | |
run: dotnet nuget push ${{ env.NUGET_PATH }}/*.nupkg --api-key ${{ secrets.GHUB_NUGET_AUTH_TOKEN }} --source "github" --skip-duplicate --no-symbols | |