Skip to content

Commit

Permalink
Merge remote-tracking branch 'mixxxdj/2.5' into 2.5-rel
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Dec 28, 2023
2 parents 99f3970 + 5d58718 commit bea61fb
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,65 @@ jobs:
- name: Build packages
run: ./vcpkg install --vcpkg-root=${{ matrix.vcpkg_path }} --x-buildtrees-root=${{ matrix.vcpkg_buildtrees-root }} --clean-after-build --recurse --feature-flags="-compilertracking,manifests,registries,versions" --x-abi-tools-use-exact-versions
working-directory: ${{ matrix.vcpkg_path }}

- name: "[Windows] Sign release DLLs"
env:
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
if: runner.os == 'Windows' && env.AZURE_TENANT_ID
uses: azure/azure-code-signing-action@v0.2.22
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: https://weu.codesigning.azure.net/
code-signing-account-name: mixxx
certificate-profile-name: mixxx
files-folder: ${{ matrix.vcpkg_path }}/vcpkg_installed/${{ matrix.vcpkg_triplet }}/bin
files-folder-filter: dll
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
timeout: 600

- name: "[Windows] Sign release plugins"
env:
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
if: runner.os == 'Windows' && env.AZURE_TENANT_ID
uses: azure/azure-code-signing-action@v0.2.22
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: https://weu.codesigning.azure.net/
code-signing-account-name: mixxx
certificate-profile-name: mixxx
files-folder: ${{ matrix.vcpkg_path }}/vcpkg_installed/${{ matrix.vcpkg_triplet }}/Qt6/plugins
files-folder-filter: dll
files-folder-recurse: true
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
timeout: 600

- name: "[Windows] Sign qml DLLs"
env:
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
if: runner.os == 'Windows' && env.AZURE_TENANT_ID
uses: azure/azure-code-signing-action@v0.2.22
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: https://weu.codesigning.azure.net/
code-signing-account-name: mixxx
certificate-profile-name: mixxx
files-folder: ${{ matrix.vcpkg_path }}/vcpkg_installed/${{ matrix.vcpkg_triplet }}/Qt6/qml
files-folder-filter: dll
files-folder-recurse: true
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
timeout: 600

- name: Upload GitHub Actions artifacts of build logs
if: always()
Expand Down
40 changes: 40 additions & 0 deletions overlay/scripts/delete_all_packages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env python3

# This script allows you to mass delete all packages from a 'user' repository.
# This only deletes 30 packages at a time. Repeat it until everything is deleted.

import requests

import netrc

# Configure your GitHub user name and Personal Access Token (PAT) to the `.netrc` file.
user, _, your_token = netrc.netrc().authenticators("api.github.com")

def delete_packages(pat, user):
headers = {
'Authorization': f'Bearer {pat}',
'X-GitHub-Api-Version': '2022-11-28',
'Accept': 'application/vnd.github+json' # Required header for package deletion API
}

# Fetching package versions
response = requests.get(f'https://api.github.com/users/{user}/packages?package_type=nuget', headers=headers)
response.raise_for_status()

print(response.json())

packages = response.json()

# Deleting each package
for package in packages:
package_name = package.get('name')
delete_url = f'https://api.github.com/users/{user}/packages/nuget/{package_name}'
delete_response = requests.delete(delete_url, headers=headers)
if delete_response.status_code == 204:
print(f"Package {package_name} deleted successfully.")
else:
print(f"Failed to delete package {package_name}: {delete_response.status_code}")

if __name__ == "__main__":
delete_packages(your_token, user)

0 comments on commit bea61fb

Please sign in to comment.