diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4df3541 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: 'Release' + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout the project + uses: actions/checkout@v2 + - name: Setup dotnet + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + - name: Restore packages + run: dotnet restore + - name: Build packages + run: dotnet pack --no-restore -c Release -p:PackageVersion=$(echo $GITHUB_REF | cut -d / -f 3 | cut -c2-) + - name: Publish packages + run: | + dotnet nuget push */bin/Release/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source "https://api.nuget.org/v3/index.json" +