Skip to content

Commit eeb1479

Browse files
committed
Updated release workflows:
- The release workflow no longer relies on dry_release workflow (We will turn dry-release workflow into a github action that can be used by other ruby repos later) - Updated dry release to match the steps on Jenkins - Added jenkin build link to approval message. Signed-off-by: Theo Truong <[email protected]>
1 parent 300a072 commit eeb1479

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

.github/workflows/dry_release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
push: { branches: ["*"], paths-ignore: ['*.md'] }
44
pull_request: { branches: ["*"], paths-ignore: ['*.md'] }
55
schedule: [{ cron: '0 12 * * 0' }] # Every Sunday at 12:00 UTC
6-
workflow_call: {}
76
jobs:
87
test-gem-release:
98
env:
@@ -29,7 +28,6 @@ jobs:
2928
run: |
3029
gem build opensearch-aws-sigv4.gemspec
3130
gem cert --add $GEM_PUBLIC_CERT
32-
gem install faraday -v '~> 1'
3331
gem install opensearch-aws-sigv4-*.gem
3432
gem uninstall opensearch-aws-sigv4 -x
3533
gem install opensearch-aws-sigv4-*.gem -P MediumSecurity

.github/workflows/release.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,35 @@ on:
77

88
jobs:
99
dry_release:
10+
env:
11+
GEM_PRIVATE_KEY: .github/dummy.gem-private_key.pem
12+
GEM_PUBLIC_CERT: .github/dummy.gem-public_cert.pem
1013
runs-on: ubuntu-latest
1114
steps:
12-
- uses: ./.github/workflows/dry_release.yml
15+
- uses: actions/checkout@v4
16+
- uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: 2.6
19+
bundler: none
20+
- name: Determine Ruby Version
21+
run: |
22+
set -x
23+
min_ruby_version=$(ruby -e 'puts Gem::Specification.load("opensearch-aws-sigv4.gemspec").required_ruby_version.to_s.match(/\d+\.\d+/)[0]')
24+
echo "RUBY_VERSION=$min_ruby_version" >> $GITHUB_ENV
25+
- uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: ${{ env.RUBY_VERSION }}
28+
bundler: latest
29+
- name: Build and Install Gem
30+
run: |
31+
gem build opensearch-aws-sigv4.gemspec
32+
gem cert --add $GEM_PUBLIC_CERT
33+
gem install opensearch-aws-sigv4-*.gem
34+
gem uninstall opensearch-aws-sigv4 -x
35+
gem install opensearch-aws-sigv4-*.gem -P MediumSecurity
36+
gem uninstall opensearch-aws-sigv4 -x
37+
gem install opensearch-aws-sigv4-*.gem -P HighSecurity
38+
1339
draft_release:
1440
needs: dry_release
1541
runs-on: ubuntu-latest
@@ -29,7 +55,8 @@ jobs:
2955
approvers: ${{ steps.get_approvers.outputs.approvers }}
3056
minimum-approvals: 1
3157
issue-title: "Release ${{ github.ref_name }}"
32-
issue-body: "Please approve or deny the release **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}"
58+
issue-body: "Please approve or deny the release **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}.
59+
The release pipeline for this gem can be found at https://build.ci.opensearch.org/blue/organizations/jenkins/release-opensearch-ruby-aws-sigv4/activity"
3360
exclude-workflow-initiator-as-approver: true
3461
- name: Install Ruby
3562
uses: ruby/setup-ruby@v1

0 commit comments

Comments
 (0)