v1.2.2 #15
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: release | |
on: | |
release: | |
types: | |
- published | |
env: | |
VERSION: 1.0.0 | |
jobs: | |
build: | |
environment: Production | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Restore Packages | |
run: dotnet restore | |
- name: Build Solution | |
run: dotnet build -c Release --no-restore | |
- name: Run Tests | |
run: dotnet test -c Release --no-build --verbosity normal | |
- name: Set Version Variable | |
env: | |
TAG: ${{ github.ref_name }} | |
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV | |
- name: Pack FeatBit.ServerSdk | |
run: dotnet pack ./src/FeatBit.ServerSdk/FeatBit.ServerSdk.csproj -c Release --no-restore --no-build --output ${VERSION} /p:PackageVersion=$VERSION | |
- name: Publish NuGet Package | |
run: dotnet nuget push ${VERSION}/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |