@@ -9,72 +9,4 @@ on: # yamllint disable-line rule:truthy
9
9
10
10
jobs :
11
11
generate_changelog :
12
- runs-on : ubuntu-latest
13
- name : create release draft
14
- steps :
15
- - uses : actions/checkout@v3
16
- with :
17
- fetch-depth : 0
18
- ref : master
19
-
20
- - name : ' Get Previous tag'
21
- id : previoustag
22
- uses : " WyriHaximus/github-action-get-previous-tag@master"
23
- env :
24
- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
25
-
26
- - name : calculate next version
27
- id : version
28
- uses : patrickjahns/version-drafter-action@v1
29
- env :
30
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31
-
32
- - name : Generate changelog
33
- uses : charmixer/auto-changelog-action@v1
34
- with :
35
- token : ${{ secrets.GITHUB_TOKEN }}
36
- future_release : ${{ steps.version.outputs.next-version }}
37
-
38
-
39
- - name : update inspec.yml
40
-
41
- with :
42
- cmd : yq w -I4 -i inspec.yml version ${{ steps.version.outputs.next-version }} && sed -i '1i---' inspec.yml
43
-
44
- - name : push inspec.yml and changelog
45
- uses :
github-actions-x/[email protected]
46
- with :
47
- github-token : ${{ secrets.GITHUB_TOKEN }}
48
- push-branch : ' master'
49
- commit-message : ' update inspec.yml and changelog'
50
- files : inspec.yml CHANGELOG.md
51
- name : dev-sec CI
52
-
53
- force-add : ' true'
54
-
55
- - name : Generate changelog for the release
56
- run : |
57
- sed '/## \[${{ steps.previoustag.outputs.tag }}\]/Q' CHANGELOG.md > CHANGELOGRELEASE.md
58
-
59
- - name : Read CHANGELOG.md
60
- id : package
61
- uses : juliangruber/read-file-action@v1
62
- with :
63
- path : ./CHANGELOGRELEASE.md
64
-
65
- - name : Delete old drafts
66
- uses :
hugo19941994/[email protected]
67
- env :
68
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69
-
70
- - name : Create Release draft
71
- id : create_release
72
- uses : actions/create-release@v1
73
- env :
74
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
75
- with :
76
- release_name : ${{ steps.version.outputs.next-version }}
77
- tag_name : ${{ steps.version.outputs.next-version }}
78
- body : |
79
- ${{ steps.package.outputs.content }}
80
- draft : true
12
+ uses : dev-sec/.github/.github/workflows/baseline-release.yml@main
0 commit comments