Skip to content

Commit

Permalink
add ghpackageconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
王达 authored and Administrator committed Jan 13, 2022
1 parent 5c1a2aa commit 673f005
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 11 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/package_push_github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Packege Push Github
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
package-push:
name: package build and push
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: setting dotnet version
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
include-prerelease: true

- name: restore
run: dotnet restore

- name: build
run: dotnet build --no-restore

- name: pack
run: dotnet pack --include-symbols -p:PackageVersion=0.0.$GITHUB_RUN_ID

- name: package push
run: dotnet nuget push "**/*.symbols.nupkg" --api-key ${{secrets.PACKAGE_NUGET_GITHUB}} --source "github"
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

name: Packege CI
name: Package Push Nuget
on:
create:
ref_type: [ tag ]
ref_type: [ tags ]
# push:
# branches: [ develop ]
# pull_request:
Expand Down
19 changes: 19 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project>
<PropertyGroup>
<PackageId>$(AssemblyName)</PackageId>
<PackageIcon>packageIcon.png</PackageIcon>
<Authors>masastack</Authors>
<Copyright>© masastack Corporation. All rights reserved.</Copyright>
<PackageIconUrl>packageIcon.png</PackageIconUrl>
<RepositoryUrl>https://github.com/masastack/MASA.Utils</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
</PropertyGroup>
<ItemGroup>
<None Include="$(RepositoryRoot)packageIcon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
16 changes: 7 additions & 9 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--<add key="public" value="http://proget-hz.lonsid.cn/nuget/public/v3/index.json" />
<add key="gitlab" value="http://gitlab-hz.lonsid.cn/api/v4/projects/29/packages/nuget/index.json" />-->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="github" value="https://nuget.pkg.github.com/masastack/index.json" />
</packageSources>
<packageSourceCredentials>
<gitlab>
<add key="Username" value="masa" />
<add key="ClearTextPassword" value="2oVCQ7KBG5AsB2s_mFhd" />
</gitlab>
</packageSourceCredentials>
</configuration>
<github>
<add key="Username" value="masastack" />
<add key="ClearTextPassword" value="${{secrets.PACKAGE_NUGET_GITHUB}}" />
</github>
</configuration>
Binary file added packageIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 673f005

Please sign in to comment.