File tree Expand file tree Collapse file tree 1 file changed +20
-41
lines changed Expand file tree Collapse file tree 1 file changed +20
-41
lines changed Original file line number Diff line number Diff line change 44 workflow_dispatch :
55
66jobs :
7- github- release :
8- name : " create release"
7+ release :
8+ name : " release"
99 runs-on : " ubuntu-latest"
1010 if : github.repository_owner == 'puppetlabs'
1111
1212 steps :
13- - name : " checkout"
14- uses : " actions/checkout@v3"
15- with :
16- ref : ${{ github.ref }}
17- clean : true
18- fetch-depth : 0
19-
20- - name : " get version"
21- id : " get_version"
22- run : |
23- echo "::set-output name=version::$(jq --raw-output .version metadata.json)"
2413
25- - name : " create release"
26- run : |
27- gh release create "${{ steps.get_version.outputs.version }}"
28- env :
29- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30-
31- publish-gem :
32- name : " publish gem"
33- runs-on : " ubuntu-latest"
34- needs : " github-release"
35- steps :
3614 - name : " checkout"
3715 uses : " actions/checkout@v3"
3816 with :
@@ -46,37 +24,38 @@ jobs:
4624 ruby-version : 2.7
4725 bundler-cache : true
4826
49- - name : " build"
27+ - name : " get version"
28+ id : " get_version"
29+ run : |
30+ echo "::set-output name=version::$(jq --raw-output .version metadata.json)"
31+
32+ - name : " build gem"
5033 run : |
5134 bundle exec rake build
5235
53- - name : " publish"
36+ - name : " publish gem "
5437 run : |
55- bundle exec rake push
38+ gem push ./pkg/*.gem
5639 env :
5740 GEM_HOST_API_KEY : ${{ secrets.GEM_HOST_API_KEY }}
5841
59- publish-module :
60- name : " publish module"
61- runs-on : ubuntu-20.04
62- needs : publish-gem
63- steps :
64- - name : " checkout"
65- uses : " actions/checkout@v3"
66- with :
67- ref : ${{ github.ref }}
68- clean : true
69-
70- - name : " update readme"
42+ - name : " update module readme"
7143 run : |
7244 mv pwshlib.md README.md
7345
74- - name : " build"
46+ - name : " build module "
7547 uses : " docker://puppet/pdk:latest"
7648 with :
7749 args : ' build'
7850
79- - name : " publish"
51+ - name : " publish module "
8052 uses : " docker://puppet/pdk:latest"
8153 with :
8254 args : ' release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'
55+
56+ - name : " create release"
57+ run : |
58+ gh release create v${{ steps.get_version.outputs.version }} ./pkg/*.gem ./pkg/*.tar.gz --title v${{ steps.get_version.outputs.version }}
59+ env :
60+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61+
You can’t perform that action at this time.
0 commit comments