ci: run the valid version step only in public repos
This commit is contained in:
parent
e3962a1fc1
commit
e313fc8cf8
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -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()
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user