-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
28 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 |
---|---|---|
|
@@ -13,6 +13,9 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -26,15 +29,12 @@ jobs: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 2 | ||
filter: blob:none # We don't need all blobs | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
path: ~/.nuget/packages | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
# key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-nuget | ||
|
||
- name: restore | ||
run: dotnet restore | ||
|
@@ -55,9 +55,6 @@ jobs: | |
needs: [test] | ||
runs-on: windows-latest | ||
timeout-minutes: 15 | ||
permissions: | ||
packages: write | ||
contents: write | ||
|
||
env: | ||
CONFIGURATION: Release | ||
|
@@ -66,15 +63,12 @@ jobs: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 # needed so minver finds git tags https://github.com/actions/checkout/issues/172 | ||
filter: blob:none # We don't need all blobs | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
path: ~/.nuget/packages | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
# key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-nuget | ||
|
||
- name: restore | ||
run: dotnet restore | ||
|
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 |
---|---|---|
|
@@ -12,14 +12,16 @@ env: | |
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | ||
cancel-in-progress: true | ||
cancel-in-progress: false | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
release: | ||
runs-on: windows-latest | ||
timeout-minutes: 15 | ||
permissions: | ||
packages: write | ||
contents: write | ||
|
||
env: | ||
|
@@ -29,15 +31,14 @@ jobs: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 # needed so minver finds git tags https://github.com/actions/checkout/issues/172 | ||
filter: blob:none # We don't need all blobs | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
path: ~/.nuget/packages | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
# key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-nuget | ||
restore-keys: | | ||
${{ runner.os }}-nuget | ||
- name: restore | ||
run: dotnet restore | ||
|
@@ -53,23 +54,24 @@ jobs: | |
name: packages | ||
path: bin/*.nupkg | ||
|
||
# - name: deploy github.com | ||
# run: | | ||
# dotnet nuget add source --username $NUGET_USR --password $NUGET_PSW --store-password-in-clear-text --name github $NUGET_SOURCE | ||
# find bin -name '*.nupkg' | xargs dotnet nuget push -s github --skip-duplicate --force-english-output | ||
# shell: bash | ||
# env: | ||
# NUGET_SOURCE: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json | ||
# NUGET_KEY: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: deploy nuget.org | ||
run: find bin -name '*.nupkg' | xargs dotnet nuget push -s $NUGET_SOURCE -k $NUGET_KEY --skip-duplicate --force-english-output | ||
shell: bash | ||
env: | ||
NUGET_SOURCE: https://api.nuget.org/v3/index.json | ||
NUGET_KEY: ${{ secrets.NUGET_API_KEY }} | ||
|
||
- name: prepare version | ||
run: echo VERSION=${GITHUB_REF_NAME#v} >> $GITHUB_ENV | ||
|
||
- uses: marvinpinto/[email protected] | ||
- name: Generate changelog with git-cliff | ||
uses: tj-actions/git-cliff@b8b856ab6829a813d4ed58476b6faaec9c2b24ef # v1.4.2 | ||
with: | ||
args: --latest --strip all | ||
output: 'CHANGELOG.md' | ||
|
||
- uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
bodyFile: 'CHANGELOG.md' | ||
name: ${{ env.VERSION }} | ||
prerelease: ${{ contains(github.ref_name, '-') }} |