-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
154 changed files
with
12,764 additions
and
3,377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet | ||
{ | ||
"name": "C# (.NET)", | ||
"image": "mcr.microsoft.com/devcontainers/dotnet:1-7.0-jammy", | ||
"onCreateCommand": "./scripts/load_submodule.sh", | ||
"postCreateCommand": "dotnet restore && dotnet build", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-dotnettools.csdevkit" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
authors: | ||
- octocat | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- breaking-change | ||
- title: Exciting New Features 🎉 | ||
labels: | ||
- enhancement | ||
- title: What's Changed | ||
labels: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Package Cleanup | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' # Run every day at 24:00 | ||
|
||
jobs: | ||
|
||
delete-myget-pkgs: | ||
name: Delete Old MyGet Packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Install Requests | ||
run: pip install requests | ||
- name: Install Packaging | ||
run: pip install packaging | ||
- name: Delete versions below 3.6.1 | ||
env: | ||
MYGET_FEED: 'neo' | ||
PACKAGE_NAMES: 'Neo.SmartContract.Framework,Neo.SmartContract.Testing' | ||
MYGET_API_KEY: ${{ secrets.MYGET_TOKEN }} | ||
run: | | ||
import requests | ||
from packaging import version | ||
import os | ||
def get_versions(feed, package_name, api_key): | ||
url = f"https://www.myget.org/F/{feed}/api/v2/Packages?$select=Version&$filter=Id eq '{package_name}'&$format=json" | ||
headers = {'Accept': 'application/json'} | ||
response = requests.get(url, headers=headers) | ||
if response.status_code == 200: | ||
versions = response.json()['d']['results'] | ||
return [ver['Version'] for ver in versions] | ||
else: | ||
return [] | ||
def delete_version(feed, package_name, ver, api_key): | ||
url = f"https://www.myget.org/F/{feed}/api/v2/package/{package_name}/{ver}?hardDelete=true" | ||
headers = {"X-NuGet-ApiKey": api_key} | ||
response = requests.delete(url, headers=headers) | ||
return response.status_code == 200 # Success | ||
feed = os.environ['MYGET_FEED'] | ||
package_names = os.environ['PACKAGE_NAMES'].split(',') | ||
api_key = os.environ['MYGET_API_KEY'] | ||
for package_name in package_names: | ||
versions_to_delete = get_versions(feed, package_name, api_key) | ||
for ver in versions_to_delete: | ||
if version.parse(ver.split("-", 1)[0]) >= version.Version("3.6.1"): | ||
print(f"Omited {ver} of package {package_name}.") | ||
continue | ||
if delete_version(feed, package_name, ver, api_key): | ||
print(f"Deleted version {ver} of package {package_name}.") | ||
else: | ||
print(f"Failed to delete version {ver} of package {package_name}.") | ||
shell: python | ||
|
||
delete-git-pkgs: | ||
name: Delete Old Github Packages | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Delete Neo.SmartContract.Testing Package | ||
uses: actions/delete-package-versions@v4 | ||
with: | ||
package-name: Neo.SmartContract.Testing | ||
package-type: nuget | ||
min-versions-to-keep: 3 | ||
delete-only-pre-release-versions: "true" | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Delete Neo.SmartContract.Framework Package | ||
uses: actions/delete-package-versions@v4 | ||
with: | ||
package-name: Neo.SmartContract.Framework | ||
package-type: nuget | ||
min-versions-to-keep: 3 | ||
delete-only-pre-release-versions: "true" | ||
token: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"dotnet.defaultSolution": "neo-devpack-dotnet.sln" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule neo
updated
72 files
Oops, something went wrong.