Skip to content

Commit

Permalink
Publish package
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyRaga committed Nov 22, 2022
1 parent c526d93 commit 0f8c13a
Showing 1 changed file with 33 additions and 35 deletions.
68 changes: 33 additions & 35 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,40 +88,38 @@ jobs:
name: packages-${{ matrix.os }}-net${{ matrix.dotnet }}
path: ${{ github.workspace }}/packages/**/*.nupkg

release:
runs-on: ubuntu-latest
needs: [ git-version, build ]
if: github.ref == 'refs/heads/main'


steps:
- name: Get packages for publishing
uses: actions/download-artifact@v3
id: download
with:
name: packages-ubuntu-latest-net6.x
path: packages

- uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.x"

- name: Publish packages
run: dotnet nuget push ${{ github.workspace }}/packages/**/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

# release:
# runs-on: ubuntu-latest
# needs: [ git-version, build ]
# if: github.ref == 'refs/heads/main'
#
#
# steps:
# - name: Get packages for publishing
# uses: actions/download-artifact@v3
# id: download
# with:
# name: packages-ubuntu-latest-net6.x
# path: packages
#
# - uses: actions/setup-dotnet@v3
# with:
# dotnet-version: "6.x"
#
# - name: Publish packages
# run: dotnet nuget push ${{ github.workspace }}/packages/**/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
#
# - name: Create tag
# id: create_tag
# uses: anothrNick/github-tag-action@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CUSTOM_TAG: v${{ needs.git-version.outputs.MajorMinorPatch }}
#
# - name: Create release
# uses: ncipollo/release-action@v1
# with:
# name: Release ${{ needs.git-version.outputs.MajorMinorPatch }}
# tag: ${{ steps.create_tag.outputs.tag }}
# token: ${{ secrets.GITHUB_TOKEN }}
# generateReleaseNotes: true
- name: Create tag
id: create_tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: v${{ needs.git-version.outputs.MajorMinorPatch }}

- name: Create release
uses: ncipollo/release-action@v1
with:
name: Release ${{ needs.git-version.outputs.MajorMinorPatch }}
tag: ${{ steps.create_tag.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true

0 comments on commit 0f8c13a

Please sign in to comment.