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:
|
env:
|
||||||
VERSION: ${{ env.NEW_FILE_VERSION }}
|
VERSION: ${{ env.NEW_FILE_VERSION }}
|
||||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||||
|
GITHUB_REPO_VISIBILITY: ${{ github.event.repository.visibility }}
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
if: success()
|
if: success()
|
||||||
|
@ -5,6 +5,7 @@ const { URL } = require('url');
|
|||||||
|
|
||||||
const repository = process.env.GITHUB_REPOSITORY;
|
const repository = process.env.GITHUB_REPOSITORY;
|
||||||
const version = process.env.VERSION;
|
const version = process.env.VERSION;
|
||||||
|
const gitHubRepoVisibilty = process.env.GITHUB_REPO_VISIBILITY
|
||||||
let currentVersion = "";
|
let currentVersion = "";
|
||||||
let targetAbi = "";
|
let targetAbi = "";
|
||||||
|
|
||||||
@ -42,7 +43,11 @@ async function updateManifest() {
|
|||||||
checksum: getMD5FromFile(),
|
checksum: getMD5FromFile(),
|
||||||
timestamp: new Date().toISOString().replace(/\.\d{3}Z$/, 'Z')
|
timestamp: new Date().toISOString().replace(/\.\d{3}Z$/, 'Z')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(`Repo is ${gitHubRepoVisibilty}.`);
|
||||||
|
if (gitHubRepoVisibilty === 'public') {
|
||||||
await validVersion(newVersion);
|
await validVersion(newVersion);
|
||||||
|
}
|
||||||
|
|
||||||
// Add the new version to the manifest
|
// Add the new version to the manifest
|
||||||
jsonData[0].versions.unshift(newVersion);
|
jsonData[0].versions.unshift(newVersion);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user