@@ -35,50 +35,26 @@ jobs:
35
35
fetch-depth : 0
36
36
persist-credentials : false
37
37
38
- - name : Append PDK to Gemfile
39
- if : ${{ github.repository_owner == 'puppetlabs' }}
40
- run : |
41
- echo "gem 'pdk'" >> Gemfile
42
-
43
- - name : Activate Ruby 2.7
44
- uses : ruby/setup-ruby@v1
45
- if : ${{ github.repository_owner == 'puppetlabs' }}
38
+ - name : " PDK Release prep"
39
+ uses : docker://puppet/pdk:nightly
46
40
with :
47
- ruby-version : " 2.7"
48
- bundler-cache : true
49
-
50
- - name : Print bundle environment
51
- if : ${{ github.repository_owner == 'puppetlabs' }}
52
- run : |
53
- echo ::group::bundler environment
54
- buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
55
- echo ::endgroup::
56
-
57
- - name : " Honeycomb: Record Bundler Setup time"
58
- if : ${{ github.repository_owner == 'puppetlabs' }}
59
- run : |
60
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Bundler Setup'
61
- echo STEP_ID="auto_release_setup" >> $GITHUB_ENV
62
- echo STEP_START=$(date +%s) >> $GITHUB_ENV
41
+ args : ' release prep --force'
42
+ env :
43
+ CHANGELOG_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
63
44
64
- - name : " PDK Release prep "
45
+ - name : " Get Version "
65
46
if : ${{ github.repository_owner == 'puppetlabs' }}
47
+ id : gv
66
48
run : |
67
- buildevents cmd $TRACE_ID $STEP_ID 'pdk release prep' -- bundle exec pdk release prep --force
49
+ echo "::set-output name=ver::$(cat metadata.json | jq .version | tr -d \")"
68
50
69
51
- name : " Commit changes"
70
52
if : ${{ github.repository_owner == 'puppetlabs' }}
71
53
run : |
72
54
git config --local user.email "[email protected] "
73
55
git config --local user.name "GitHub Action"
74
56
git add .
75
- git commit -m "Auto-Release prep"
76
-
77
- - name : " Get Version"
78
- if : ${{ github.repository_owner == 'puppetlabs' }}
79
- id : gv
80
- run : |
81
- echo "::set-output name=ver::$(cat metadata.json | jq .version)"
57
+ git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
82
58
83
59
- name : Create Pull Request
84
60
id : cpr
@@ -90,10 +66,16 @@ jobs:
90
66
branch : " release-prep"
91
67
delete-branch : true
92
68
title : " Release prep v${{ steps.gv.outputs.ver }}"
69
+ body : " Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb)"
93
70
labels : " maintenance"
94
71
95
72
- name : PR outputs
96
73
if : ${{ github.repository_owner == 'puppetlabs' }}
97
74
run : |
98
75
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
99
76
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
77
+
78
+ - name : " Honeycomb: Record finish step"
79
+ if : ${{ always() }}
80
+ run : |
81
+ buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow'
0 commit comments