Publish to zurg-testing
This commit is contained in:
64
.github/workflows/build.yml
vendored
64
.github/workflows/build.yml
vendored
@@ -118,38 +118,14 @@ jobs:
|
|||||||
git config --global user.email "zurg@debridmediamanager.com"
|
git config --global user.email "zurg@debridmediamanager.com"
|
||||||
git lfs install
|
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
|
- name: Create Release in Target Repository
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PAT }}
|
github-token: ${{ secrets.TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
const ownerName = 'debridmediamanager';
|
const ownerName = 'debridmediamanager';
|
||||||
const repoName = 'zurg-early-releases';
|
const repoName = 'zurg-testing';
|
||||||
const tagName = '${{ steps.version.outputs.version }}';
|
const tagName = '${{ steps.version.outputs.version }}';
|
||||||
const releaseName = `${tagName}`;
|
const releaseName = `${tagName}`;
|
||||||
|
|
||||||
@@ -176,38 +152,6 @@ jobs:
|
|||||||
- PayPal: https://paypal.me/yowmamasita
|
- 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 = `
|
const releaseBody = `
|
||||||
Version: ${tagName}
|
Version: ${tagName}
|
||||||
Commit: [${{ github.sha }}](https://github.com/debridmediamanager/zurg/commit/${{ github.sha }})
|
Commit: [${{ github.sha }}](https://github.com/debridmediamanager/zurg/commit/${{ github.sha }})
|
||||||
@@ -215,7 +159,7 @@ jobs:
|
|||||||
|
|
||||||
${sponsorshipDetails}
|
${sponsorshipDetails}
|
||||||
|
|
||||||
Shoutouts to our amazing sponsors! ${githubSponsors}
|
[version history](https://github.com/debridmediamanager/zurg-testing/wiki/History)
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const response = await github.rest.repos.createRelease({
|
const response = await github.rest.repos.createRelease({
|
||||||
|
|||||||
Reference in New Issue
Block a user