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