File tree 1 file changed +25
-6
lines changed
1 file changed +25
-6
lines changed Original file line number Diff line number Diff line change 5
5
tags :
6
6
- ' *'
7
7
8
+ # Following is for testing only:
9
+ # on:
10
+ # pull_request:
11
+ # branches:
12
+ # - master
13
+
8
14
jobs :
9
15
build :
10
16
runs-on : ubuntu-latest
11
17
steps :
18
+ # expected format of the new git tag: v1.2.3
19
+ - name : Get tag
20
+ id : get_tag
21
+ # TODO: use GIT TAG!!! run: echo ::set-env name=GIT_TAG::${GITHUB_REF#refs/tags/}
22
+ run : echo ::set-env name=VERSION::$(echo ${GITHUB_REF#refs/tags/} | sed -e 's/^v//g')
12
23
- uses : actions/checkout@v2
13
- # Setup .npmrc file to publish to npm
24
+ with :
25
+ fetch-depth : 0
26
+ ref : master
14
27
- uses : actions/setup-node@v1
15
28
with :
16
29
node-version : ' 12.x'
17
30
registry-url : ' https://registry.npmjs.org'
31
+ - run : |
32
+ git config user.name 'GitHub action executed on release'
33
+ git config user.email 'github@users.noreply.github.com'
18
34
- run : yarn install
19
- # expected format of the new git tag: 1.2.3
20
- # TODO: remove optional 'v' from beginning of the tag name
21
- - run : yarn publish --new-version ${GITHUB_REF#refs/tags/}
35
+ - run : yarn publish --new-version ${{ env.VERSION }}
22
36
env :
23
37
NODE_AUTH_TOKEN : ${{ secrets.NPMJS_PUBLISH_TOKEN }}
24
38
- name : Create Pull Request
25
39
uses : peter-evans/create-pull-request@v2
26
40
with :
27
- committer : GitHub <noreply@github.com>
28
- author : ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
41
+ token : ${{ secrets.GITHUB_TOKEN }}
42
+ title : Autogenerated new version ${{ env.VERSION }}
43
+ base : master
44
+ commit-message : Add dummy file
45
+ committer : GitHub action executed on release <noreply@github.com>
46
+ author : GitHub action executed on release <noreply@github.com>
47
+
29
48
You can’t perform that action at this time.
0 commit comments