|
@@ -4,7 +4,11 @@ on:
|
|
workflow_dispatch:
|
|
workflow_dispatch:
|
|
push:
|
|
push:
|
|
paths:
|
|
paths:
|
|
- - 'srcpkgs/**'
|
|
|
|
|
|
+ - "srcpkgs/**"
|
|
|
|
+
|
|
|
|
+permissions:
|
|
|
|
+ contents: write
|
|
|
|
+ packages: write
|
|
|
|
|
|
env:
|
|
env:
|
|
ARCH: x86_64
|
|
ARCH: x86_64
|
|
@@ -27,7 +31,7 @@ jobs:
|
|
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
|
|
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
|
|
xbps-install -Syu xbps
|
|
xbps-install -Syu xbps
|
|
xbps-install -Syu
|
|
xbps-install -Syu
|
|
- xbps-install -y tar curl openssh unzip git jq
|
|
|
|
|
|
+ xbps-install -y tar curl openssh unzip git jq github-cli
|
|
|
|
|
|
- name: Checkout repositories
|
|
- name: Checkout repositories
|
|
uses: actions/checkout@v4
|
|
uses: actions/checkout@v4
|
|
@@ -40,6 +44,36 @@ jobs:
|
|
with:
|
|
with:
|
|
path: custom-packages
|
|
path: custom-packages
|
|
|
|
|
|
|
|
+ - name: Delete existing release assets
|
|
|
|
+ env:
|
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
+ run: |
|
|
|
|
+ # Get the release ID for the 'latest' tag
|
|
|
|
+ RELEASE_ID=$(gh api \
|
|
|
|
+ -H "Accept: application/vnd.github+json" \
|
|
|
|
+ /repos/$GITHUB_REPOSITORY/releases/tags/latest \
|
|
|
|
+ --jq '.id' || echo "")
|
|
|
|
+
|
|
|
|
+ if [ ! -z "$RELEASE_ID" ]; then
|
|
|
|
+ # Get all assets for this release
|
|
|
|
+ assets=$(gh api \
|
|
|
|
+ -H "Accept: application/vnd.github+json" \
|
|
|
|
+ /repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID/assets \
|
|
|
|
+ --jq '.[].id' || echo "")
|
|
|
|
+
|
|
|
|
+ # Delete each asset
|
|
|
|
+ for asset_id in $assets; do
|
|
|
|
+ gh api \
|
|
|
|
+ --method DELETE \
|
|
|
|
+ -H "Accept: application/vnd.github+json" \
|
|
|
|
+ /repos/$GITHUB_REPOSITORY/releases/assets/$asset_id
|
|
|
|
+ done
|
|
|
|
+
|
|
|
|
+ echo "All assets from the latest release have been deleted"
|
|
|
|
+ else
|
|
|
|
+ echo "No release with tag 'latest' found or unable to access release"
|
|
|
|
+ fi
|
|
|
|
+
|
|
- name: Setup and build packages
|
|
- name: Setup and build packages
|
|
run: |
|
|
run: |
|
|
# Setup void-packages
|
|
# Setup void-packages
|
|
@@ -79,7 +113,7 @@ jobs:
|
|
- name: Create Release
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
uses: softprops/action-gh-release@v1
|
|
env:
|
|
env:
|
|
- GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
|
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
with:
|
|
files: |
|
|
files: |
|
|
/github/home/packages/*.xbps
|
|
/github/home/packages/*.xbps
|