-
Notifications
You must be signed in to change notification settings - Fork 1
/
.projenrc.ts
52 lines (46 loc) · 1.69 KB
/
.projenrc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { cdk } from 'projen';
import { GithubCredentials } from 'projen/lib/github';
import { NpmAccess } from 'projen/lib/javascript';
const project = new cdk.JsiiProject({
author: 'Mike Gray',
authorAddress: '[email protected]',
defaultReleaseBranch: 'main',
name: '@mikejgray/ovos-skill-projen',
projenrcTs: true,
repositoryUrl: 'https://github.com/mikejgray/ovos-skill-projen.git',
repository: 'https://github.com/mikejgray/ovos-skill-projen.git',
npmRegistryUrl: 'https://npm.pkg.github.com',
releaseToNpm: true,
npmAccess: NpmAccess.PUBLIC,
depsUpgradeOptions: {
workflowOptions: {
projenCredentials:
GithubCredentials.fromPersonalAccessToken({ secret: 'GITHUB_TOKEN' }),
},
},
githubOptions: { mergify: false },
license: 'Apache-2.0',
deps: ['projen'],
bundledDeps: ['yaml'],
devDeps: ['jsii-rosetta@~5.0.7'],
gitignore: ['.DS_Store'],
description: 'A projen project for creating OVOS skills, or retrofitting Mycroft skills to OVOS',
});
project.compileTask.exec(
'cp src/files/* lib/files',
);
const upgradeMain = project.tryFindObjectFile('.github/workflows/upgrade-main.yml');
upgradeMain?.addOverride('jobs.pr.steps.4.with.token', '${{ secrets.GITHUB_TOKEN }}');
upgradeMain?.addOverride('jobs.pr.permissions.pull-requests', 'write');
upgradeMain?.addOverride('jobs.pr.permissions.contents', 'write');
const release = project.tryFindObjectFile('.github/workflows/release.yml');
release?.addOverride('jobs.release_npm.steps.8', {
name: 'Release to NPMJS',
env: {
NPM_DIST_TAG: 'latest',
NPM_REGISTRY: 'https://registry.npmjs.org/',
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}',
},
run: 'npx -p publib@latest publib-npm',
});
project.synth();