Skip to content

Commit

Permalink
fix(workflow): don't add secrets in wbfy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Feb 7, 2022
1 parent 7054566 commit ff03b47
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/generators/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,19 @@ function getTestWorkflow(config: PackageConfig, kind: 'test' | 'release' | 'wbfy
job.with ||= {};
job.with['non_self_hosted'] = true;
}
if (config.release.github || kind === 'wbfy') {
job.secrets ||= {};
if (config.private) {
job.secrets['GH_TOKEN'] = '${{ secrets.GH_BOT_PAT }}';
} else {
job.secrets['GH_TOKEN'] = '${{ secrets.PUBLIC_GH_BOT_PAT }}';
if (kind === 'release' || kind === 'test') {
if (config.release.github) {
job.secrets ||= {};
if (config.private) {
job.secrets['GH_TOKEN'] = '${{ secrets.GH_BOT_PAT }}';
} else {
job.secrets['GH_TOKEN'] = '${{ secrets.PUBLIC_GH_BOT_PAT }}';
}
}
if (config.release.npm) {
job.secrets ||= {};
job.secrets['NPM_TOKEN'] = '${{ secrets.NPM_TOKEN }}';
}
}
if (config.release.npm) {
job.secrets ||= {};
job.secrets['NPM_TOKEN'] = '${{ secrets.NPM_TOKEN }}';
}
return yaml.dump(workflow, {
styles: {
Expand Down

0 comments on commit ff03b47

Please sign in to comment.