File: release.yml

package info (click to toggle)
ruby-bson 5.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,828 kB
  • sloc: ruby: 11,712; ansic: 1,427; java: 514; makefile: 8
file content (90 lines) | stat: -rw-r--r-- 2,471 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: "BSON Release"
run-name: "BSON Release for ${{ github.ref }}"

on:
  # for auto-deploy when merging a release-candidate PR
  push:
    branches:
      - 'master'
      - '*-stable'

  # for manual release
  workflow_dispatch:
    inputs:
      pr:
        description: "The number of the merged release candidate PR"
        required: true

env:
  GEM_NAME: bson
  PRODUCT_NAME: BSON for Ruby
  PRODUCT_ID: mongodb-ruby-driver

permissions:
  # required for all workflows
  security-events: write

  # required to fetch internal or private CodeQL packs
  packages: read

  # only required for workflows in private repositories
  actions: read
  pull-requests: read
  contents: write

  # required by the mongodb-labs/drivers-github-tools/setup@v2 step
  # also required by `rubygems/release-gem`
  id-token: write

jobs:
  check:
    name: "Check Release"
    runs-on: ubuntu-latest
    outputs:
      message: ${{ steps.check.outputs.message }}
      ref: ${{ steps.check.outputs.ref }}
    steps:
      - name: "Run the check action"
        id: check
        uses: mongodb-labs/drivers-github-tools/ruby/pr-check@v3

  build:
    name: "Build Gems"
    needs: check
    environment: release
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby: [ 'ruby-3.2', 'jruby-9.4' ]
    steps:
      - name: "Run the build action"
        uses: mongodb-labs/drivers-github-tools/ruby/build@v3
        with:
          app_id: ${{ vars.APP_ID }}
          app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
          artifact: ${{ matrix.ruby }}
          gem_name: ${{ env.GEM_NAME }}
          ruby_version: ${{ matrix.ruby }}
          ref: ${{ needs.check.outputs.ref }}

  publish:
    name: Publish Gems
    needs: [ check, build ]
    environment: release
    runs-on: ubuntu-latest
    steps:
      - name: "Run the publish action"
        uses: mongodb-labs/drivers-github-tools/ruby/publish@v3
        with:
          app_id: ${{ vars.APP_ID }}
          app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
          aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
          aws_region_name: ${{ vars.AWS_REGION_NAME }}
          aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
          dry_run: false
          gem_name: ${{ env.GEM_NAME }}
          product_name: ${{ env.PRODUCT_NAME }}
          product_id: ${{ env.PRODUCT_ID }}
          release_message: ${{ needs.check.outputs.message }}
          ref: ${{ needs.check.outputs.ref }}