Skip to content

Fix CodeQL issues (#143) #94

Fix CodeQL issues (#143)

Fix CodeQL issues (#143) #94

name: Publish preview to GitHub registry
# ==== NOTE: do not rename this yml file or the $GITHUB_RUN_NUMBER will be reset ====
on:
push:
branches:
- master
- develop
paths:
- src/**
- .github/workflows/**
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
source-url: https://nuget.pkg.github.com/sungam3r/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
working-directory: src
run: dotnet restore
- name: Build solution [Release]
working-directory: src
run: dotnet build --no-restore -c Release
- name: Pack solution [Release]
working-directory: src
run: dotnet pack --no-restore -c Release -o out
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Nuget packages
path: |
src/out/*
- name: Publish Nuget packages to GitHub registry
working-directory: src
run: dotnet nuget push "out/*" -k ${{secrets.GITHUB_TOKEN}}