Update csproj #183
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: release | |
on: | |
push: | |
branches: | |
- releases/** | |
- hotfix/** | |
- develop | |
- main | |
- features/** | |
paths: | |
- src/** | |
- .github/workflows/release.yml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: | | |
9.x | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '6.0.x' | |
- name: Install dependencies | |
run: dotnet restore ./src/AzureMapsControl.Components/AzureMapsControl.Components.csproj | |
- name: Build | |
run: dotnet build --configuration Release --no-restore ./src/AzureMapsControl.Components/AzureMapsControl.Components.csproj | |
- name: Test | |
run: dotnet test ./tests/AzureMapsControl.Components.Tests/AzureMapsControl.Components.Tests.csproj | |
- name: NPM Install | |
run: cd ./src/AzureMapsControl.Components && npm i --force | |
- name: Lint | |
run: cd ./src/AzureMapsControl.Components && npx eslint -c eslint.config.mjs | |
- name: Build Typescript | |
run: cd ./src/AzureMapsControl.Components && npm run build | |
- name: Use GitVersion | |
id: gitversion # step id used as reference for output values | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Tag Repo Prerelease | |
if: ${{ steps.gitversion.outputs.branchName != 'master' && steps.gitversion.outputs.branchName != 'main' }} | |
uses: richardsimko/update-tag@v1 | |
with: | |
tag_name: ${{ steps.gitversion.outputs.fullSemVer }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Tag Repo | |
if: ${{ steps.gitversion.outputs.branchName == 'master' || steps.gitversion.outputs.branchName == 'main' }} | |
uses: richardsimko/update-tag@v1 | |
with: | |
tag_name: ${{ steps.gitversion.outputs.majorMinorPatch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pack PreRelease | |
if: ${{ steps.gitversion.outputs.branchName != 'master' && steps.gitversion.outputs.branchName != 'main' }} | |
run: dotnet pack ./src/AzureMapsControl.Components/AzureMapsControl.Components.csproj -p:Version='${{ steps.gitversion.outputs.fullSemVer }}"' -c Release --no-build | |
- name: Pack | |
if: ${{ steps.gitversion.outputs.branchName == 'master' || steps.gitversion.outputs.branchName == 'main' }} | |
run: dotnet pack ./src/AzureMapsControl.Components/AzureMapsControl.Components.csproj -p:Version='${{ steps.gitversion.outputs.majorMinorPatch }}"' -c Release --no-build | |
- name: Publish | |
env : | |
NUGETAPIKEY: ${{secrets.NUGETAPIKEY}} | |
run: dotnet nuget push "**/AzureMapsControl.Components*.nupkg" -s https://api.nuget.org/v3/index.json -k $NUGETAPIKEY --skip-duplicate |