@@ -2,66 +2,75 @@ name: "Mongoid Release"
2
2
run-name : " Mongoid Release for ${{ github.ref }}"
3
3
4
4
on :
5
- workflow_dispatch :
6
- inputs :
7
- dry_run :
8
- description : Whether this is a dry run or not
9
- required : true
10
- default : true
11
- type : boolean
5
+ # for auto-deploy when merging a release-candidate PR
6
+ pull_request :
7
+ types : [ closed ]
12
8
13
9
env :
14
10
SILK_ASSET_GROUP : mongoid
15
- RELEASE_MESSAGE_TEMPLATE : |
16
- Version {0} of the [Mongoid ODM for MongoDB](https://rubygems.org/gems/mongoid) is now available.
17
11
18
- **Release Highlights**
12
+ permissions :
13
+ # required for all workflows
14
+ security-events : write
19
15
20
- TODO: one or more paragraphs describing important changes in this release
16
+ # required to fetch internal or private CodeQL packs
17
+ packages : read
21
18
22
- **Documentation**
19
+ # only required for workflows in private repositories
20
+ actions : read
21
+ pull-requests : read
22
+ contents : write
23
23
24
- Documentation is available at [MongoDB.com](https://www.mongodb.com/docs/mongoid/current/).
24
+ # required by the mongodb-labs/drivers-github-tools/setup@v2 step
25
+ # also required by `rubygems/release-gem`
26
+ id-token : write
25
27
26
- **Installation**
27
-
28
- You may install this version via RubyGems, with:
28
+ jobs :
29
+ check :
30
+ name : " Check Release"
31
+ runs-on : ubuntu-latest
32
+ outputs :
33
+ message : ${{ steps.check.outputs.message }}
34
+ ref : ${{ steps.check.outputs.ref }}
35
+ steps :
36
+ - name : " Run the check action"
37
+ id : check
38
+ uses : jamis/drivers-github-tools/ruby/pr-check@ruby-3643-update-release-process
29
39
30
- gem install --version {0} mongoid
40
+ build :
41
+ name : " Build Gems"
42
+ needs : check
43
+ environment : release
44
+ runs-on : ubuntu-latest
45
+ steps :
46
+ - name : " Run the build action"
47
+ uses : jamis/drivers-github-tools/ruby/build@ruby-3643-update-release-process
48
+ with :
49
+ app_id : ${{ vars.APP_ID }}
50
+ app_private_key : ${{ secrets.APP_PRIVATE_KEY }}
51
+ artifact : mongoid
52
+ gem_name : mongoid
53
+ ruby_version : ' ruby-3.2'
54
+ ref : ${{ needs.check.outputs.ref }}
31
55
32
- jobs :
33
- release :
34
- name : " Mongoid Release "
56
+ publish :
57
+ name : " Publish Gems "
58
+ needs : [ check, build ]
35
59
environment : release
36
60
runs-on : ' ubuntu-latest'
37
-
38
- permissions :
39
- # required for all workflows
40
- security-events : write
41
-
42
- # required to fetch internal or private CodeQL packs
43
- packages : read
44
-
45
- # only required for workflows in private repositories
46
- actions : read
47
- contents : write
48
-
49
- # required by the mongodb-labs/drivers-github-tools/setup@v2 step
50
- # also required by `rubygems/release-gem`
51
- id-token : write
52
-
53
61
steps :
54
62
- name : " Run the publish action"
55
- uses : mongodb-labs /drivers-github-tools/ruby/publish@v2
63
+ uses : jamis /drivers-github-tools/ruby/publish@ruby-3643-update-release-process
56
64
with :
57
65
app_id : ${{ vars.APP_ID }}
58
66
app_private_key : ${{ secrets.APP_PRIVATE_KEY }}
59
67
aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
60
68
aws_region_name : ${{ vars.AWS_REGION_NAME }}
61
69
aws_secret_id : ${{ secrets.AWS_SECRET_ID }}
62
- dry_run : ${{ inputs.dry_run }}
70
+ dry_run : false
63
71
gem_name : mongoid
64
72
product_name : Mongoid
65
73
product_id : mongoid
66
- release_message_template : ${{ env.RELEASE_MESSAGE_TEMPLATE }}
74
+ release_message : ${{ needs.check.outputs.message }}
67
75
silk_asset_group : ${{ env.SILK_ASSET_GROUP }}
76
+ ref : ${{ needs.check.outputs.ref }}
0 commit comments