Skip to content

Fix typo in library name #2

Fix typo in library name

Fix typo in library name #2

Workflow file for this run

name: Build and test
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
packages: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 2.2.108
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Restore packages
run: dotnet restore
- name: Build
run: dotnet build
- name: Test
run: dotnet test
- name: Pack for version
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet pack -c Release -p:PackageVersion=${GITHUB_REF:11}
- name: Pack without version
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: dotnet pack -c Release -p:PackageVersion=1.0.0.0
- name: Upload windows artifact
uses: actions/upload-artifact@v3
with:
name: nuget
path: ./ReflectionUtilities/bin/Release/ReflectionUtilities.*.nupkg
pack:
needs: build
name: deploy
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: nuget
path: ./artifacts
- name: Setup nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest'
- name: Setup nuget config
run: nuget.exe sources add -name github -source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" -username ${{ github.actor }} -password ${{ secrets.GITHUB_TOKEN }}
- name: Upload to GitHub Packages
run: |
for f in ./artifacts/*.nupkg
do
nuget push $f -Source "github"
done
shell: bash