Merge pull request #20 from Jandev/dependabot/nuget/src/AzureFunction… #8
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 a Beta version | |
on: | |
push: | |
branches: [develop] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch all history for all tags and branches | |
run: git fetch --unshallow || true | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v0.9.13 | |
with: | |
versionSpec: "5.x" | |
- name: Use GitVersion | |
id: gitversion # step id used as reference for output values | |
uses: gittools/actions/gitversion/execute@v0.9.13 | |
- run: | | |
echo "NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersionV2 }}" | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.301 | |
- name: Install dependencies | |
run: dotnet restore ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj | |
- name: Build | |
run: dotnet build ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --configuration Release --no-restore | |
- name: Test | |
run: dotnet test ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --no-restore --verbosity normal | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ steps.gitversion.outputs.NuGetVersionV2 }} | |
release_name: Release ${{ steps.gitversion.outputs.NuGetVersionV2 }} | |
prerelease: true |