v1.2.8 #22
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: release | |
| on: | |
| release: | |
| types: | |
| - published | |
| env: | |
| VERSION: 1.0.0 | |
| jobs: | |
| build: | |
| environment: Production | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| global-json-file: global.json | |
| - name: Set Version Variable | |
| env: | |
| TAG: ${{ github.ref_name }} | |
| run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV | |
| - name: Restore Packages | |
| run: dotnet restore | |
| - name: Build Solution | |
| run: dotnet build -c Release --no-restore /p:Version=$VERSION | |
| - name: Run Tests | |
| run: dotnet test -c Release --no-build --verbosity normal | |
| - name: Pack FeatBit.ServerSdk | |
| run: dotnet pack ./src/FeatBit.ServerSdk/FeatBit.ServerSdk.csproj -c Release --no-restore --no-build --output ${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 |