Merge pull request #46 from jeffijoe/fix/url #86
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: Build, Test and Release | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: [ released ] | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 100 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dependencies | |
working-directory: ./src | |
run: dotnet restore | |
- name: Build | |
working-directory: ./src | |
run: | | |
dotnet build --configuration Release --no-restore | |
dotnet pack -c Release Jeffijoe.MessageFormat/Jeffijoe.MessageFormat.csproj | |
- name: Test | |
working-directory: ./src | |
run: dotnet test --no-restore --verbosity normal | |
- name: Publish to NuGet | |
if: github.event_name == 'release' # Only publish on Release creation. | |
working-directory: ./src | |
run: | | |
dotnet nuget push Jeffijoe.MessageFormat/**/*.nupkg --api-key ${{ secrets.NUGET_JEFFIJOE_KEY }} --source https://api.nuget.org/v3/index.json |