From 40e39f05d0b0109eacece14feb1fd7d83da2a3c7 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Thu, 16 Jul 2020 18:57:33 +0800 Subject: [PATCH] Improve publish.yml --- .github/workflows/publish.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c8091f9d..4c39b009 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,18 +10,12 @@ jobs: - uses: actions/checkout@v2 - uses: warrenbuckley/Setup-Nuget@v1 - - name: dotnet build - run: dotnet build -c Release - - - name: dotnet pack - run: dotnet pack -c Release --no-build -o dest - - name: read common.props id: commonProps uses: juliangruber/read-file-action@v1 with: path: ./common.props - + - name: get version id: getVersion uses: AsasInnab/regex-action@v1 @@ -30,11 +24,11 @@ jobs: regex_flags: 'gim' search_string: '${{ steps.commonProps.outputs.content }}' - - name: add git tag - uses: Klemensas/action-autotag@stable - with: - version: ${{ steps.commonProps.outputs.content }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: dotnet build + run: dotnet build -c Release + + - name: dotnet pack + run: dotnet pack -c Release --no-build -o dest - name: remove unused packages run: | @@ -51,4 +45,10 @@ jobs: dotnet nuget push dest\*.nupkg -s "github" --skip-duplicate - name: dotnet nuget push to NuGet - run: dotnet nuget push dest\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate \ No newline at end of file + run: dotnet nuget push dest\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate + + - name: add git tag + uses: Klemensas/action-autotag@stable + with: + version: ${{ steps.commonProps.outputs.content }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file