Skip to content

Use Environment.ProcessId instead #97

Use Environment.ProcessId instead

Use Environment.ProcessId instead #97

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x 7.0.x
- name: Print Env
run: printenv
shell: bash
- name: Build
run: |
dotnet build src/NonTerminatingProcess --configuration Release
dotnet build src/SelfTerminatingProcess --configuration Release
- name: Test
timeout-minutes: 5
run: dotnet test src/LittleForker.Tests --configuration Release
- name: Pack
run: dotnet pack src/LittleForker --configuration Release --output artifacts
- name: Push to GitHub
if: github.event_name == 'push'
continue-on-error: true
run: dotnet nuget push artifacts/*.nupkg -s https://nuget.pkg.github.com/damianh/index.json -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Push to Nuget.org (on tag)
if: startsWith(github.ref, 'refs/tags/v')
continue-on-error: true
run: dotnet nuget push artifacts/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_ORG_TOKEN}} --skip-duplicate
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: artifacts