diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54b2752..bf47ddf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,7 @@ jobs: env: VERSION: ${{ env.NEW_FILE_VERSION }} GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_REPO_VISIBILITY: ${{ github.event.repository.visibility }} - name: Commit changes if: success() diff --git a/validate-and-update-manifest.js b/validate-and-update-manifest.js index 2c3840b..6f82421 100644 --- a/validate-and-update-manifest.js +++ b/validate-and-update-manifest.js @@ -5,6 +5,7 @@ const { URL } = require('url'); const repository = process.env.GITHUB_REPOSITORY; const version = process.env.VERSION; +const gitHubRepoVisibilty = process.env.GITHUB_REPO_VISIBILITY let currentVersion = ""; let targetAbi = ""; @@ -42,7 +43,11 @@ async function updateManifest() { checksum: getMD5FromFile(), timestamp: new Date().toISOString().replace(/\.\d{3}Z$/, 'Z') }; - await validVersion(newVersion); + + console.log(`Repo is ${gitHubRepoVisibilty}.`); + if (gitHubRepoVisibilty === 'public') { + await validVersion(newVersion); + } // Add the new version to the manifest jsonData[0].versions.unshift(newVersion);