Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move build scripts over to run-script #136

Merged
merged 2 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"run-script": {
"version": "0.1.0-beta.2",
"commands": [
"r"
]
}
}
}
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,20 @@ jobs:
dotnet-version: |
3.1.x
5.0.x
6.0.x

- name: Set up .NET Core (global.json)
uses: actions/setup-dotnet@v2.0.0
#- name: Set up .NET Core (global.json)
# uses: actions/setup-dotnet@v2.0.0

- run: npm ci

- run: dotnet build --configuration Release
- run: dotnet tool restore

- run: dotnet r build:release

- run: dotnet test --configuration Release --no-build --logger "trx" --results-directory "./.codecoverage"
- run: dotnet r test:release

- run: dotnet pack --configuration Release --output ./artifacts --version-suffix $VERSION_SUFFIX
- run: dotnet r pack:release -- --version-suffix $VERSION_SUFFIX

- name: Upload artifacts
uses: actions/upload-artifact@v3.0.0
Expand All @@ -60,7 +63,7 @@ jobs:
if: always()
with:
name: test-results
path: ./.codecoverage/*.trx
path: ./.coverage/*.trx

- name: Publish to GPR
run: |
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,20 @@ jobs:
dotnet-version: |
3.1.x
5.0.x
6.0.x

- name: Set up .NET Core (global.json)
uses: actions/setup-dotnet@v2.0.0
#- name: Set up .NET Core (global.json)
# uses: actions/setup-dotnet@v2.0.0

- run: npm ci

- run: dotnet build --configuration Release
- run: dotnet tool restore

- run: dotnet r build:release

- run: dotnet test --configuration Release --no-build --logger "trx" --results-directory "./.codecoverage"
- run: dotnet r test:release

- run: dotnet pack --configuration Release --output ./artifacts --version-suffix $VERSION_SUFFIX
- run: dotnet r pack:release -- --version-suffix $VERSION_SUFFIX

- name: Upload artifacts
uses: actions/upload-artifact@v3.0.0
Expand All @@ -55,4 +58,4 @@ jobs:
if: always()
with:
name: test-results
path: ./.codecoverage/*.trx
path: ./.coverage/*.trx
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,20 @@ jobs:
dotnet-version: |
3.1.x
5.0.x
6.0.x

- name: Set up .NET Core (global.json)
uses: actions/setup-dotnet@v2.0.0
#- name: Set up .NET Core (global.json)
# uses: actions/setup-dotnet@v2.0.0

- run: npm ci

- run: dotnet build --configuration Release
- run: dotnet tool restore

- run: dotnet r build:release

- run: dotnet test --configuration Release --no-build --logger "trx" --results-directory "./.codecoverage"
- run: dotnet r test:release

- run: dotnet pack --configuration Release --output ./artifacts
- run: dotnet r pack:release

- name: Upload artifacts
uses: actions/upload-artifact@v3.0.0
Expand All @@ -55,7 +58,7 @@ jobs:
if: always()
with:
name: test-results
path: ./.codecoverage/*.trx
path: ./.coverage/*.trx

- name: Upload release assets
uses: softprops/action-gh-release@v1
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"files.associations" : {
"global.json" : "json5"
},
"cSpell.words": [
"evenodd",
"heroicon",
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Target .NET Core 3.1, .NET 5.0, and .NET 6.0
- Moved build scripts over to the [run-script](https://github.com/xt0rted/dotnet-run-script) dotnet tool

## [1.0.5](https://github.com/xt0rted/heroicons-tag-helper/compare/v1.0.4...v1.0.5) - 2021-11-07

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,8 @@ will output
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
```

## Development

This project uses the [run-script](https://github.com/xt0rted/dotnet-run-script) dotnet tool to manage its build and test scripts.
To use this you'll need to run `dotnet tool install` and then `dotnet r` to see the available commands or look at the `scripts` section in the [global.json](global.json).
13 changes: 13 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{
"sdk": {
"version": "6.0.201"
},
"scripts": {
// Debug mode scripts
"build": "dotnet build",
"test": "dotnet test --no-build --logger \"trx\" --results-directory \"./.coverage\"",
"pack": "dotnet pack --no-build --output ./artifacts",
"ci": "dotnet r build && dotnet r test && dotnet r pack",

// Release mode scripts
"build:release": "dotnet r build -- --configuration Release",
"test:release": "dotnet r test -- --configuration Release",
"pack:release": "dotnet r pack -- --configuration Release",
"ci:release": "dotnet r build:release && dotnet r test:release && dotnet r pack:release"
}
}