File tree Expand file tree Collapse file tree 2 files changed +62
-29
lines changed Expand file tree Collapse file tree 2 files changed +62
-29
lines changed Original file line number Diff line number Diff line change @@ -3,18 +3,21 @@ name: release
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
- npmTag :
6
+ versionType :
7
7
type : choice
8
- description : ' NPM tag to release '
8
+ description : ' Version type to publish '
9
9
options :
10
10
- latest
11
11
- next
12
12
required : true
13
13
default : " latest"
14
14
15
15
jobs :
16
- release :
16
+ publish :
17
17
runs-on : ubuntu-latest
18
+ permissions :
19
+ id-token : write
20
+ contents : read
18
21
19
22
steps :
20
23
- uses : actions/checkout@v4
35
38
- name : Build packages
36
39
run : yarn release:build
37
40
38
- - name : Unit Testing
39
- run : yarn test:ci
40
-
41
- - name : Linting & Types
42
- run : yarn lint:all
43
-
44
- - name : Creates local .npmrc
45
- run : echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
46
-
47
- - name : Prepare Lingui-Bot git account
48
- uses : oleksiyrudenko/gha-git-credentials@v2-latest
49
- with :
50
- name : ' Lingui Bot'
51
-
52
- actor : ' lingui-bot'
53
- token : ' ${{ secrets.GH_TOKEN }}'
54
-
55
- - name : Versioning packages
56
- env :
57
- GH_TOKEN : ${{ secrets.GH_TOKEN }}
58
- run : yarn version:${{github.event.inputs.npmTag}}
59
-
60
- - name : Packaging packages with newer version
61
- run : yarn release:build
62
-
63
41
- name : Publishing packages
64
42
env :
65
43
GH_TOKEN : ${{ secrets.GH_TOKEN }}
66
- run : yarn release:${{github.event.inputs.npmTag }}
44
+ run : yarn release:${{github.event.inputs.versionType }}
Original file line number Diff line number Diff line change
1
+ name : version-bump
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ versionType :
7
+ type : choice
8
+ description : ' Version type to bump'
9
+ options :
10
+ - latest
11
+ - next
12
+ required : true
13
+ default : " latest"
14
+
15
+ jobs :
16
+ version-bump :
17
+ runs-on : ubuntu-latest
18
+
19
+ steps :
20
+ - uses : actions/checkout@v4
21
+ with :
22
+ fetch-depth : 0
23
+
24
+ - name : Setup node
25
+ uses : actions/setup-node@v4
26
+ with :
27
+ always-auth : true
28
+ node-version : 20
29
+ cache : ' yarn'
30
+ scope : ' @lingui'
31
+
32
+ - name : Install dependencies if needed
33
+ run : yarn install
34
+
35
+ - name : Build packages
36
+ run : yarn release:build
37
+
38
+ - name : Unit Testing
39
+ run : yarn test:ci
40
+
41
+ - name : Linting & Types
42
+ run : yarn lint:all
43
+
44
+ - name : Prepare Lingui-Bot git account
45
+ uses : oleksiyrudenko/gha-git-credentials@v2-latest
46
+ with :
47
+ name : ' Lingui Bot'
48
+
49
+ actor : ' lingui-bot'
50
+ token : ' ${{ secrets.GH_TOKEN }}'
51
+
52
+ - name : Versioning packages
53
+ env :
54
+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
55
+ run : yarn version:${{github.event.inputs.versionType}}
You can’t perform that action at this time.
0 commit comments