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