From 68b946c625b8a3ccba486549dbdcbb057ca4aba5 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Thu, 1 Feb 2024 02:36:09 +0100 Subject: [PATCH] Publish to zurg-testing --- .github/workflows/build.yml | 64 +++---------------------------------- 1 file changed, 4 insertions(+), 60 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 573eba9..d765264 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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({