PR EntityTableClient - chore/tableclient refact internal dependencies #147
Workflow file for this run
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: pull-request alpha publish | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
tags: | |
description: 'Test scenario tags' | |
pull_request: | |
branches: [ main ] | |
paths: [src/**] | |
env: | |
GITHUB_PACKAGES_URL: https://nuget.pkg.github.com/evodim/index.json | |
BUILD_CONFIGURATION: 'Release' # set this mto the appropriate build configuration | |
DOTNET_VERSION: '6.x' | |
MinVerMinimumMajorMinor: '1.1' | |
MinVerTagPrefix: 'v' | |
MinVerDefaultPreReleaseIdentifiers : 'alpha-${{ github.run_number }}' | |
jobs: | |
az-artifacts-build-and-deploy-private: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repo | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# Retrieve minVer version | |
- name: Set APP_VERSION based on repo w/MinVer | |
run: | | |
dotnet tool install -g minver-cli -v q | |
APP_VERSION=`minver` | |
echo "Adding version to GITHUB_ENV: APP_VERSION=$APP_VERSION" | |
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV | |
# Install Azure sorage emulator | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
- name: Install & run Azurite | |
run: npm install -g azurite | |
- name: Run Azurite in Background | |
shell: bash | |
run: azurite -L & | |
# Setup .NET Core SDK | |
- name: dotnet add nuget source | |
run: | | |
dotnet nuget add source --username medevod --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github '${{ env.GITHUB_PACKAGES_URL }}' | |
- name: dotnet build and publish | |
run: | | |
dotnet restore | |
dotnet build --configuration '${{ env.BUILD_CONFIGURATION }}' --version-suffix '${{ env.APP_VERSION }}' | |
dotnet test --configuration '${{ env.BUILD_CONFIGURATION }}' -v n | |
dotnet pack -c '${{ env.BUILD_CONFIGURATION }}' --no-build --version-suffix '${{ env.APP_VERSION }}' | |
# Publish the package to Azure Artifacts | |
- name: 'dotnet publish' | |
run: dotnet nuget push --api-key ${{ secrets.INTERNAL_PKG_NUGET_PAT }} --source "github" src/Azure.EntityServices.*/bin/Release/*.nupkg |