Merge pull request #9 from veryfi/manycoding-patch-1 #14
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
name: .NET | |
on: [ push ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Setup Multiple .NET Versions | |
env: | |
DOTNET_NOLOGO: true | |
steps: | |
- name: Getting code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 50 | |
- name: Generate build number | |
if: contains(join(github.event.commits.*.message), 'fix:') || | |
contains(join(github.event.commits.*.message), 'feat:') || | |
contains(join(github.event.commits.*.message), 'perf:') | |
uses: einaregilsson/build-number@v3 | |
with: | |
token: ${{ secrets.github_token }} | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
5.0.x | |
7.0.x | |
- name: Generate Package Release Notes | |
run: | | |
echo 'PACKAGE_RELEASE_NOTES<<EOF' >> $GITHUB_ENV | |
echo '⭐ Last 10 features:' >> $GITHUB_ENV | |
git log -10 --pretty=format:"- %s %cs" --grep=feat >> $GITHUB_ENV | |
echo '' >> $GITHUB_ENV | |
echo '🐞 Last 10 bug fixes:' >> $GITHUB_ENV | |
git log -10 --pretty=format:"- %s %cs" --grep=fix >> $GITHUB_ENV | |
echo '' >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
- name: Build | |
run: dotnet build --configuration Release | |
- name: Run tests | |
run: dotnet test --configuration Release | |
env: | |
VERYFI_USERNAME: ${{ secrets.VERYFI_USERNAME }} | |
VERYFI_API_KEY: ${{ secrets.VERYFI_API_KEY }} | |
VERYFI_CLIENT_ID: ${{ secrets.VERYFI_CLIENT_ID }} | |
VERYFI_CLIENT_SECRET: ${{ secrets.VERYFI_CLIENT_SECRET }} | |
- name: Publish | |
if: contains(join(github.event.commits.*.message), 'fix:') || | |
contains(join(github.event.commits.*.message), 'feat:') || | |
contains(join(github.event.commits.*.message), 'perf:') | |
run: dotnet nuget push | |
src\**.nupkg | |
--api-key ${{ secrets.NUGET_KEY }} | |
--source https://api.nuget.org/v3/index.json | |
--skip-duplicate |