update npm dependencies #35
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
name: NuGet Packages CD | |
on: | |
push: | |
tags: ['**'] | |
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
Pack: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# https://github.com/actions/checkout/issues/701 https://github.com/actions/checkout/pull/579 | |
fetch-depth: 0 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
6.0.x | |
7.0.x | |
8.0.x | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV | |
- run: npm i | |
# Remove Meziantou.Analyzer from all projects (Roslyn analyzer which does not need to pollute the nuget package) | |
- run: dotnet remove package Meziantou.Analyzer | |
working-directory: packages/Ignis.Components | |
- run: dotnet remove package Meziantou.Analyzer | |
working-directory: packages/Ignis.Fragments.Abstractions | |
- run: | | |
dotnet build tools/Ignis.Components.HeroIcons.Generator -c Release | |
dotnet tools/Ignis.Components.HeroIcons.Generator/bin/Release/net8.0/Ignis.Components.HeroIcons.Generator.dll | |
# This is required to build the wwwroot folder so it is included in the nuget package (https://github.com/DavidVollmers/Ignis/issues/2) | |
- run: dotnet build -c Release packages/Ignis.Components.Web | |
- run: dotnet pack -c Release -p:Version=$VERSION | |
#TODO build templates using latest version of Ignis | |
# - run: dotnet pack -c Release -p:Version=$VERSION packages/Ignis.Templates | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: NuGet | |
path: ./nuget | |
Publish: | |
runs-on: ubuntu-latest | |
needs: Pack | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
# - run: dotnet nuget add source --username DavidVollmers --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github https://nuget.pkg.github.com/DavidVollmers/index.json | |
- uses: actions/download-artifact@v3 | |
with: | |
name: NuGet | |
path: ./nuget | |
- run: dotnet nuget push ./nuget/**.nupkg --source nuget.org --api-key ${{ secrets.NUGET_API_KEY }} | |
# Currently does not work (403). Probably not used anyways... | |
# dotnet nuget push ./nuget/**.nupkg --source github --api-key ${{ secrets.PAT_GITHUB }} |