From 39d43ca362b6a5b80e822b0877dcdb3b2464a1ce Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Wed, 13 Apr 2022 17:01:23 -0500 Subject: [PATCH] Use get latest release endpoint for plotters, so that we ignore any pre-releases that could be returned by listReleases --- .github/workflows/build-linux-arm64-installer.yml | 8 ++++---- .github/workflows/build-linux-installer-deb.yml | 8 ++++---- .github/workflows/build-linux-installer-rpm.yml | 8 ++++---- .github/workflows/build-macos-installer.yml | 4 ++-- .github/workflows/build-macos-m1-installer.yml | 4 ++-- .github/workflows/build-windows-installer.yml | 8 ++++---- .gitignore | 4 ++++ 7 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-linux-arm64-installer.yml b/.github/workflows/build-linux-arm64-installer.yml index 61ad71d55030..be1d7c9cea38 100644 --- a/.github/workflows/build-linux-arm64-installer.yml +++ b/.github/workflows/build-linux-arm64-installer.yml @@ -68,11 +68,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'chia-plotter-madmax', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest madmax plotter run: | @@ -89,11 +89,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'bladebit', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest bladebit plotter run: | diff --git a/.github/workflows/build-linux-installer-deb.yml b/.github/workflows/build-linux-installer-deb.yml index a9feddfe1441..0937822c51f0 100644 --- a/.github/workflows/build-linux-installer-deb.yml +++ b/.github/workflows/build-linux-installer-deb.yml @@ -102,11 +102,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'chia-plotter-madmax', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest madmax plotter run: | @@ -123,11 +123,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'bladebit', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest bladebit plotter run: | diff --git a/.github/workflows/build-linux-installer-rpm.yml b/.github/workflows/build-linux-installer-rpm.yml index c97c85526079..16d8378fb6f3 100644 --- a/.github/workflows/build-linux-installer-rpm.yml +++ b/.github/workflows/build-linux-installer-rpm.yml @@ -71,11 +71,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'chia-plotter-madmax', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest madmax plotter run: | @@ -92,11 +92,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'bladebit', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest bladebit plotter run: | diff --git a/.github/workflows/build-macos-installer.yml b/.github/workflows/build-macos-installer.yml index fa9f7d12dc98..04c7bff453b2 100644 --- a/.github/workflows/build-macos-installer.yml +++ b/.github/workflows/build-macos-installer.yml @@ -110,11 +110,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'chia-plotter-madmax', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest madmax plotter run: | diff --git a/.github/workflows/build-macos-m1-installer.yml b/.github/workflows/build-macos-m1-installer.yml index 323e636311cf..92c118120e4f 100644 --- a/.github/workflows/build-macos-m1-installer.yml +++ b/.github/workflows/build-macos-m1-installer.yml @@ -84,11 +84,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'chia-plotter-madmax', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest madmax plotter run: | diff --git a/.github/workflows/build-windows-installer.yml b/.github/workflows/build-windows-installer.yml index ae2161f0b3b3..22abcf919476 100644 --- a/.github/workflows/build-windows-installer.yml +++ b/.github/workflows/build-windows-installer.yml @@ -111,11 +111,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'chia-plotter-madmax', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest madmax plotter run: | @@ -130,11 +130,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | - const releases = await github.rest.repos.listReleases({ + const release = await github.rest.repos.getLatestRelease({ owner: 'Chia-Network', repo: 'bladebit', }); - return releases.data[0].tag_name; + return release.data.tag_name; - name: Get latest bladebit plotter run: | diff --git a/.gitignore b/.gitignore index c5082e8b5f64..f70408d1fec5 100644 --- a/.gitignore +++ b/.gitignore @@ -298,3 +298,7 @@ tags [._]*.un~ # End of https://www.toptal.com/developers/gitignore/api/python,git,vim + +# Ignore the binaries that are pulled for the installer +/bladebit/ +/madmax/