An abp application module group that provides basic e-shop service.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

54 lines
1.6 KiB

name: publish to nuget
on:
push:
branches:
- master # Default release branch
jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: warrenbuckley/Setup-Nuget@v1
- 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
with:
regex_pattern: '(?<=>)[^<>]+(?=</Version>)'
regex_flags: 'gim'
search_string: '${{ steps.commonProps.outputs.content }}'
- 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: |
cd dest
del * -Exclude EasyAbp.*
del * -Exclude *.${{ steps.getVersion.outputs.first_match }}.nupkg
del *.HttpApi.Client.ConsoleTestApp*
del *.Host.Shared*
dir -name
- name: dotnet nuget push to GitHub
run: |
dotnet nuget add source https://nuget.pkg.github.com/EasyAbp/index.json -n github -u EasyAbp -p ${{secrets.GITHUB_TOKEN}}
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
- name: add git tag
uses: Klemensas/action-autotag@stable
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.getVersion.outputs.first_match }}