Commit 88128f2 Sergio
committed
1 parent 2da90b1 commit 88128f2 Copy full SHA for 88128f2
File tree 5 files changed +3311
-73
lines changed
5 files changed +3311
-73
lines changed Original file line number Diff line number Diff line change 1
1
name : Main CI
2
2
3
3
on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ distTag :
7
+ description : ' Dist tag to publish'
8
+ required : true
9
+ default : ' latest'
4
10
pull_request :
5
11
push :
6
12
branches :
16
22
steps :
17
23
- uses : actions/checkout@v2
18
24
with :
25
+ fetch-depth : 0
19
26
persist-credentials : false
20
27
21
28
- name : Restore cache
@@ -30,10 +37,21 @@ jobs:
30
37
always-auth : true
31
38
node-version : 12
32
39
40
+ - name : Creates local .npmrc
41
+ if : ${{github.event.inputs.distTag == 'latest'}}
42
+ run : echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
43
+
33
44
- name : Install
34
45
run : yarn install --frozen-lockfile
35
46
36
47
- name : Build & Testing
37
48
run : |
38
49
yarn build
39
50
yarn test
51
+
52
+ - name : Release
53
+ if : ${{github.event.inputs.distTag == 'latest'}}
54
+ run : |
55
+ git config --global user.email "sergiomorenoalbert@gmail.com"
56
+ git config --global user.name "Lingui CI"
57
+ npm run release
Original file line number Diff line number Diff line change 2
2
<h1 >Lingui Codemods<sub >js</sub ></h1 >
3
3
<img src =" https://github.com/lingui/codemods/workflows/Main%20CI/badge.svg " />
4
4
<a href =" https://www.npmjs.com/package/@lingui/codemods/v/latest " ><img src =" https://img.shields.io/npm/v/@lingui/codemods/latest.svg " /></a >
5
+ <a href =" https://github.com/semantic-release/semantic-release " >
6
+ <img src =" https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg " />
7
+ </a >
8
+
5
9
6
10
This repository contains a collection of codemod scripts for use with [ JSCodeshift] ( https://github.com/facebook/jscodeshift ) that help update Lingui APIs.
7
11
Original file line number Diff line number Diff line change 20
20
"scripts" : {
21
21
"test" : " jest" ,
22
22
"build" : " tsc && chmod 755 ./bin/lingui-codemod.js" ,
23
- "jscodeshift" : " jscodeshift"
23
+ "jscodeshift" : " jscodeshift" ,
24
+ "release" : " semantic-release"
24
25
},
25
26
"dependencies" : {
26
27
"chalk" : " ^2.4.2" ,
34
35
"devDependencies" : {
35
36
"@babel/core" : " ^7.12.3" ,
36
37
"@babel/preset-env" : " ^7.12.1" ,
38
+ "@semantic-release/changelog" : " ^5.0.1" ,
39
+ "@semantic-release/git" : " ^9.0.0" ,
37
40
"@types/jest" : " ^26.0.15" ,
38
41
"@types/jscodeshift" : " ^0.7.1" ,
39
42
"@types/node" : " ^14.14.0" ,
40
43
"jest" : " ^26.6.0" ,
44
+ "semantic-release" : " ^17.2.1" ,
41
45
"ts-jest" : " ^26.4.1" ,
42
46
"typescript" : " ^4.0.3"
43
47
},
44
48
"contributors" : [
45
49
" Sergio Moreno <sergiomorenoalbert@gmail.com>"
50
+ ],
51
+ "keywords" : [
52
+ " @lingui" ,
53
+ " lingui" ,
54
+ " jscodeshift" ,
55
+ " codemods"
46
56
]
47
57
}
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ branches : [
3
+ "main"
4
+ ] ,
5
+ plugins : [
6
+ "@semantic-release/commit-analyzer" ,
7
+ "@semantic-release/release-notes-generator" ,
8
+ "@semantic-release/changelog" ,
9
+ [
10
+ "@semantic-release/npm" ,
11
+ {
12
+ npmPublish : true ,
13
+ pkgRoot : "."
14
+ } ,
15
+ ] ,
16
+ {
17
+ assets : [ "package.json" , "CHANGELOG.md" ] ,
18
+ message : "chore(release): ${nextRelease.version} ${nextRelease.notes}" ,
19
+ path : "@semantic-release/git" ,
20
+ } ,
21
+ "@semantic-release/github"
22
+ ] ,
23
+ } ;
You can’t perform that action at this time.
0 commit comments