Publish jakb/beast-client by @jrbentzon #16
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: Publish to Github package feed | |
run-name: Publish ${{github.ref_name}} by @${{ github.actor }} | |
on: workflow_dispatch | |
jobs: | |
release_to_nuget: | |
name: Release distribution to Github package feed | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 6.0.x | |
- name: Set Package Version | |
run: | | |
set -e | |
version=$(git describe --tags --abbrev=7 | tr -d "v") | |
sed -i "s/<Version>0.0.0/<Version>$version/" src/SnD.ApiClient/SnD.ApiClient.csproj | |
sed -i "s/<Version>0.0.0/<Version>$version/" src/SnD.ApiClient.Azure/SnD.ApiClient.Azure.csproj | |
- name: Build NuGet for SnD.ApiClient | |
working-directory: ./src/SnD.ApiClient | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
set -e | |
version=$(git describe --tags --abbrev=7 | tr -d "v") | |
dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/SneaksAndData/index.json" | |
dotnet pack --configuration Release SnD.ApiClient.csproj | |
dotnet nuget push "bin/Release/SnD.ApiClient.$version.nupkg" --source "github" | |
- name: Build NuGet for SnD.ApiClient.Azure | |
working-directory: ./src/SnD.ApiClient.Azure | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
set -e | |
version=$(git describe --tags --abbrev=7 | tr -d "v") | |
dotnet pack --configuration Release SnD.ApiClient.Azure.csproj | |
dotnet nuget push "bin/Release/SnD.ApiClient.Azure.$version.nupkg" --source "github" |