Skip to content

Commit

Permalink
Merge branch 'core-optimize-price' of https://github.com/neo-project/neo
Browse files Browse the repository at this point in the history
 into core-optimize-price
  • Loading branch information
shargon committed Feb 14, 2024
2 parents 81f38e5 + 9645c9f commit 1dcb9a7
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,44 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.net7.0.info

PublishGithub:
if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
needs: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Set Version
run: git rev-list --count HEAD | xargs printf 'CI%05d' | xargs -I{} echo 'VERSION_SUFFIX={}' >> $GITHUB_ENV

- name : Pack (Neo)
run: |
dotnet pack \
--configuration Release \
--output ./out \
--version-suffix ${{ env.VERSION_SUFFIX }}
- name: Remove Unwanted Files
working-directory: ./out
run: |
rm -v Neo.CLI*
rm -v Neo.GUI*
- name: Publish to Github Packages
working-directory: ./out
run: |
dotnet nuget push * \
--source https://nuget.pkg.github.com/neo-project/index.json \
--api-key "${{ secrets.GITHUB_TOKEN }}" \
--disable-buffering \
--no-service-endpoint;
# MyGet isn't working
# PublishMyGet:
# if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/pkgs-delete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Nuget Package Cleanup (github)

on:
schedule:
- cron: '0 0 * * *' # Run every day at 24:00

jobs:
delete-pkgs:
name: Delete Old Nuget Packages
runs-on: ubuntu-latest

steps:
- name: Delete Neo Package
uses: actions/delete-package-versions@v4
with:
package-name: Neo
package-type: nuget
min-versions-to-keep: 3
token: "${{ secrets.GITHUB_TOKEN }}"

- name: Delete Neo.ConsoleService Package
uses: actions/delete-package-versions@v4
with:
package-name: Neo.ConsoleService
package-type: nuget
min-versions-to-keep: 3
token: "${{ secrets.GITHUB_TOKEN }}"

- name: Delete Neo.ConsoleService Package
uses: actions/delete-package-versions@v4
with:
package-name: Neo.ConsoleService
package-type: nuget
min-versions-to-keep: 3
token: "${{ secrets.GITHUB_TOKEN }}"

- name: Delete Neo.Json Package
uses: actions/delete-package-versions@v4
with:
package-name: Neo.Json
package-type: nuget
min-versions-to-keep: 3
token: "${{ secrets.GITHUB_TOKEN }}"

- name: Delete Neo.VM Package
uses: actions/delete-package-versions@v4
with:
package-name: Neo.VM
package-type: nuget
min-versions-to-keep: 3
token: "${{ secrets.GITHUB_TOKEN }}"
1 change: 1 addition & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<configuration>
<packageSources>
<clear />
<add key="github" value="https://nuget.pkg.github.com/neo-project/index.json" />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
4 changes: 4 additions & 0 deletions src/Neo/Neo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
<ProjectReference Include="..\Neo.VM\Neo.VM.csproj" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Neo.SmartContract.Testing" />
</ItemGroup>

</Project>

0 comments on commit 1dcb9a7

Please sign in to comment.