Merge pull request #57 from aliexpressru/feature/anonymous-cache-sync… #82
Workflow file for this run
This file contains hidden or 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 & Publish NuGet package | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' | |
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output | |
jobs: | |
build_publish_nuget: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --configuration Release | |
- name: Get version | |
id: get_version | |
uses: battila7/[email protected] | |
- name: Pack project Aer.ConsistentHash | |
run: dotnet pack src/Aer.ConsistentHash/Aer.ConsistentHash.csproj --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} | |
- name: Pack project Aer.Memcached.Client | |
run: dotnet pack src/Aer.Memcached.Client/Aer.Memcached.Client.csproj --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} | |
- name: Pack project Aer.Memcached | |
run: dotnet pack src/Aer.Memcached/Aer.Memcached.csproj --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} | |
- name: Push package | |
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -s ${{ env.NUGET_SOURCE_URL }} -k ${{ secrets.AER_NUGET_ACCOUNT_API_KEY }} --skip-duplicate |