Skip to content

Commit dcc4c4c

Browse files
committed
Building
1 parent 9d70bb4 commit dcc4c4c

File tree

4 files changed

+65
-1
lines changed

4 files changed

+65
-1
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [kjeske]

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v3
18+
with:
19+
dotnet-version: 8.0.x
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
working-directory: src
23+
- name: Build
24+
run: dotnet build --no-restore -c Release
25+
working-directory: src
26+
- name: Pack
27+
run: dotnet pack -c Release -o ../nupkgs --no-build
28+
working-directory: src
29+
- name: Upload artifact
30+
uses: actions/upload-artifact@v3
31+
with:
32+
path: ./nupkgs/*
33+

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v3
18+
with:
19+
dotnet-version: 6.0.x
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
working-directory: src
23+
- name: Build
24+
run: dotnet build --no-restore -c Release
25+
working-directory: src
26+
- name: Pack
27+
run: dotnet pack -c Release -o ../nupkgs --no-build
28+
working-directory: src
29+
- name: Publish
30+
run: dotnet nuget push ./nupkgs/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate -s https://api.nuget.org/v3/index.json

HydroTemplates.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageTags>dotnet-new;templates;hydro</PackageTags>
1212
<PackageProjectUrl>https://github.com/hydrostack/hydro-templates</PackageProjectUrl>
1313
<PackageReadmeFile>README.md</PackageReadmeFile>
14-
<RepositoryUrl>https://github.com/hydrostack/hydro.git</RepositoryUrl>
14+
<RepositoryUrl>https://github.com/hydrostack/hydro-templates.git</RepositoryUrl>
1515
<RepositoryType>GIT</RepositoryType>
1616
<IncludeContentInPack>true</IncludeContentInPack>
1717
<IncludeBuildOutput>false</IncludeBuildOutput>

0 commit comments

Comments
 (0)