forked from asyncapi/saunter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/main' into asyncapi#196-…
…Publish-a-global-dotnet-tool # Conflicts: # .github/workflows/ci.yaml # Saunter.sln
- Loading branch information
Showing
9 changed files
with
112 additions
and
79 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: dotnet setup | ||
description: "base dotnet setup for project" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: setup | ||
id: setup-dotnet | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: | | ||
6.0.x | ||
8.0.x |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: npm setup | ||
description: "base npm setup for project" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: setup dotnet | ||
uses: ./.github/dotnet | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/*" | ||
- name: Run NPM install | ||
shell: sh | ||
run: npm ci | ||
working-directory: ./src/Saunter.UI |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,23 @@ | ||
# Note: ci.yaml and release.yaml have some similar steps | ||
# If updating dotnet-version, set in both. | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' # e.g. v0.1.0 | ||
- "v*.*.*" # e.g. v0.1.0 | ||
|
||
jobs: | ||
release: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' # latest LTS version | ||
- uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: '6.0.x' # SDK Version to use; x will use the latest version of the channel | ||
|
||
- name: Run NPM install | ||
run: npm ci | ||
working-directory: ./src/Saunter.UI | ||
- name: Run dotnet build | ||
run: dotnet build --configuration Debug | ||
- name: Run dotnet test | ||
run: dotnet test --no-build | ||
|
||
# Below steps are only on release, not CI. | ||
- name: Set version | ||
# Gets the numeric version from a tag (e.g. v1.2.3 -> 1.2.3) | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | ||
- name: Create Nuget package | ||
run: dotnet pack ./src/Saunter/Saunter.csproj --configuration Release -p:Version="$RELEASE_VERSION" --output ./build | ||
- name: Push Nuget package to Nuget.org | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
run: dotnet nuget push ./build/*.nupkg --api-key $NUGET_API_KEY --source "https://api.nuget.org/v3/index.json" | ||
|
||
|
||
- uses: actions/checkout@v2 | ||
- name: setup build | ||
uses: ./.github/npm | ||
- name: Set version | ||
# Gets the numeric version from a tag (e.g. v1.2.3 -> 1.2.3) | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | ||
- name: Create Nuget package | ||
run: dotnet pack ./src/Saunter/Saunter.csproj --configuration Release -p:Version="$RELEASE_VERSION" --output ./build | ||
- name: Push Nuget package to Nuget.org | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
run: dotnet nuget push ./build/*.nupkg --api-key $NUGET_API_KEY --source "https://api.nuget.org/v3/index.json" |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
root=false | ||
|
||
[*.{cs,vb}] | ||
|
||
dotnet_code_quality_unused_parameters = non_public |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
root=false | ||
|
||
[*.{cs,vb}] | ||
|
||
dotnet_code_quality_unused_parameters = non_public |
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