Commit ffe3f78 Ahmad Nassri
committed
1 parent 8713970 commit ffe3f78 Copy full SHA for ffe3f78
File tree 3 files changed +46
-5
lines changed
3 files changed +46
-5
lines changed Original file line number Diff line number Diff line change 14
14
15
15
16
16
# run checks
17
- - run : npm audit --audit-level=critical
18
- - run : npx updated
17
+ - run : npm audit --audit-level=moderate
19
18
20
19
release :
21
20
needs : dependencies
@@ -26,16 +25,39 @@ jobs:
26
25
published : ${{ steps.release.outputs.published }}
27
26
release-version : ${{ steps.release.outputs.release-version }}
28
27
release-version-major : ${{ steps.release.outputs.release-version-major }}
28
+ release-version-minor : ${{ steps.release.outputs.release-version-minor }}
29
29
30
30
steps :
31
31
- uses : actions/checkout@v2
32
-
33
32
- id : release
34
33
name : dogfood
35
34
uses : ./
36
35
env :
37
36
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38
37
38
+ alias :
39
+ needs : release
40
+ if : needs.release.outputs.published == 'true'
41
+ runs-on : ubuntu-latest
42
+ strategy :
43
+ matrix :
44
+ alias :
45
+ - version : v${{ needs.release.outputs.release-version-major }}
46
+ - version : v${{ needs.release.outputs.release-version-major }}.${{ needs.release.outputs.release-version-minor }}
47
+
48
+ steps :
49
+ - uses : actions/github-script@v2
50
+ with :
51
+ script : |
52
+ const tag = 'tags/${{ matrix.alias.version }}'
53
+ const repo = {
54
+ owner: context.repo.owner,
55
+ repo: context.repo.repo
56
+ }
57
+
58
+ await github.git.deleteRef({ ...repo, ref: tag }).catch(() => {})
59
+ await github.git.createRef({ ...repo, ref: `refs/${tag}` , sha: process.env.GITHUB_SHA })
60
+
39
61
publish :
40
62
needs : release
41
63
if : needs.release.outputs.published == 'true'
Original file line number Diff line number Diff line change 1
1
# GitHub Action: Semantic Release
2
2
3
+ [ ![ license] [ license-img ]] [ license-url ]
4
+ [ ![ version] [ release-img ]] [ release-url ]
5
+ [ ![ super linter] [ super-linter-img ]] [ super-linter-url ]
6
+ [ ![ release] [ release-img ]] [ release-url ]
7
+
8
+ [ license-url ] : LICENSE
9
+ [ license-img ] : https://badgen.net/github/license/ahmadnassri/action-semantic-release
10
+
11
+ [ release-url ] : https://github.com/ahmadnassri/action-semantic-release/releases
12
+ [ release-img ] : https://badgen.net//github/release/ahmadnassri/action-semantic-release
13
+
14
+ [ super-linter-url ] : https://github.com/ahmadnassri/action-semantic-release/actions?query=workflow%3Asuper-linter
15
+ [ super-linter-img ] : https://github.com/ahmadnassri/action-semantic-release/workflows/super-linter/badge.svg
16
+
17
+ [ release-url ] : https://github.com/ahmadnassri/action-semantic-release/actions?query=workflow%3Arelease
18
+ [ release-img ] : https://github.com/ahmadnassri/action-semantic-release/workflows/release/badge.svg
19
+
3
20
[ ` semantic-release ` ] ( https://semantic-release.gitbook.io/ ) as a GitHub Action, with ** all** presets included.
4
21
5
22
- works with environment variables as documented in [ ` semantic-release ` docs] ( https://semantic-release.gitbook.io/semantic-release/usage/ci-configuration#authentication )
21
38
uses : actions/checkout@v2
22
39
23
40
- name : semantic-release
24
- uses : docker:// ahmadnassri/action-semantic-release: v1
41
+ uses : ahmadnassri/action-semantic-release@ v1
25
42
env :
26
43
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
27
44
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ branding:
7
7
8
8
runs :
9
9
using : docker
10
- image : Dockerfile
10
+ image : docker://ahmadnassri/action-semantic-release:v1
11
+ env :
12
+ GITHUB_TOKEN : ${{ github.token }}
11
13
12
14
outputs :
13
15
published :
You can’t perform that action at this time.
0 commit comments