Publish to zurg-testing

This commit is contained in:
Ben Sarmiento
2024-02-01 02:36:09 +01:00
parent 8f08178b7d
commit 68b946c625

View File

@@ -118,38 +118,14 @@ jobs:
git config --global user.email "zurg@debridmediamanager.com"
git lfs install
- name: Publish to zurg-early-releases
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
git clone https://x-access-token:${{ secrets.TOKEN }}@github.com/debridmediamanager/zurg-early-releases.git
mkdir -p zurg-early-releases/releases/${{ steps.version.outputs.version }}
cp -fR compressed_artifacts/* zurg-early-releases/releases/${{ steps.version.outputs.version }}
cd zurg-early-releases/releases/${{ steps.version.outputs.version }}
git lfs track "*.zip"
git add .
git commit -m "Release ${{ steps.version.outputs.version }}"
git push
- name: Publish to zurg-testing
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
git clone https://x-access-token:${{ secrets.TOKEN }}@github.com/debridmediamanager/zurg-testing.git
mkdir -p zurg-testing/releases/${{ steps.version.outputs.version }}
cp -fR compressed_artifacts/* zurg-testing/releases/${{ steps.version.outputs.version }}
cd zurg-testing/releases/${{ steps.version.outputs.version }}
git lfs track "*.zip"
git add .
git commit -m "Release ${{ steps.version.outputs.version }}"
git push
- name: Create Release in Target Repository
uses: actions/github-script@v7
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
github-token: ${{ secrets.PAT }}
github-token: ${{ secrets.TOKEN }}
script: |
const ownerName = 'debridmediamanager';
const repoName = 'zurg-early-releases';
const repoName = 'zurg-testing';
const tagName = '${{ steps.version.outputs.version }}';
const releaseName = `${tagName}`;
@@ -176,38 +152,6 @@ jobs:
- PayPal: https://paypal.me/yowmamasita
`;
async function getGithubSponsors() {
const query = `
query {
organization(login: "debridmediamanager") {
sponsorshipsAsMaintainer(first: 100) {
nodes {
sponsorEntity {
... on User {
login
}
... on Organization {
login
}
}
}
}
}
}`;
try {
const response = await github.graphql(query);
const sponsors = response.viewer.sponsorshipsAsMaintainer.nodes
.filter(node => node.sponsorEntity)
.map(node => '@' + node.sponsorEntity.login);
return sponsors.join(' ');
} catch (error) {
console.error("Error fetching GitHub sponsors: ", error);
return '';
}
}
const githubSponsors = await getGithubSponsors();
const releaseBody = `
Version: ${tagName}
Commit: [${{ github.sha }}](https://github.com/debridmediamanager/zurg/commit/${{ github.sha }})
@@ -215,7 +159,7 @@ jobs:
${sponsorshipDetails}
Shoutouts to our amazing sponsors! ${githubSponsors}
[version history](https://github.com/debridmediamanager/zurg-testing/wiki/History)
`;
const response = await github.rest.repos.createRelease({