Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

chore(deps): update dependency microsoft.net.test.sdk to v17.9.0 #310

chore(deps): update dependency microsoft.net.test.sdk to v17.9.0

chore(deps): update dependency microsoft.net.test.sdk to v17.9.0 #310

Workflow file for this run

name: build
on:
push:
env:
DOTNET_NOLOGO: true
ProjectLoadStyle: All
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 2
filter: blob:none
show-progress: false
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
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
- name: build
run: dotnet build --no-restore
- name: test
run: dotnet test --no-build
- name: Codecov
uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1
with:
files: '**/TestResults/*/*.cobertura.xml'
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
build:
needs: [test]
runs-on: windows-latest
timeout-minutes: 15
permissions:
contents: write
packages: write
env:
VO: true
Configuration: Release
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
show-progress: false
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
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: pack
run: dotnet pack -o bin .\OpenXmlPowerTools\
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: packages
path: bin/*.nupkg
- name: deploy github.com
if: ${{ github.ref_type == 'tag' }}
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://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
NUGET_KEY: ${{ secrets.GITHUB_TOKEN }}
- name: deploy nuget.org
if: ${{ github.ref_type == 'tag' }}
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 }}
gh-release:
needs:
- build
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ github.ref_type == 'tag' }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # Important for changelog
filter: blob:none
show-progress: false
- name: prepare version
run: echo VERSION=${GITHUB_REF_NAME#v} >> $GITHUB_ENV # trim leading 'v' from tag name
- name: Generate changelog with git-cliff
uses: tj-actions/git-cliff@b8b856ab6829a813d4ed58476b6faaec9c2b24ef # v1.4.2
with:
args: --latest --strip all
output: "CHANGELOG.md"
- name: Create Release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
bodyFile: "CHANGELOG.md"
name: ${{ env.VERSION }}
prerelease: ${{ contains(github.ref_name, '-') }}