diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bce1dc7c79..4f7696cf6e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -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/')
diff --git a/.github/workflows/pkgs-delete.yml b/.github/workflows/pkgs-delete.yml
new file mode 100644
index 0000000000..16855f1070
--- /dev/null
+++ b/.github/workflows/pkgs-delete.yml
@@ -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 }}"
diff --git a/NuGet.Config b/NuGet.Config
index 5922e754af..f7ce69db29 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -2,6 +2,7 @@
+
diff --git a/src/Neo/Neo.csproj b/src/Neo/Neo.csproj
index 234fbc62c6..130ff2a570 100644
--- a/src/Neo/Neo.csproj
+++ b/src/Neo/Neo.csproj
@@ -22,4 +22,8 @@
+
+
+
+