Skip to content

Commit

Permalink
Use rubygems OIDC (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieSinn authored Oct 24, 2024
1 parent 3dd3b90 commit e620735
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
release:
name: Version Bump and Release
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -52,7 +54,7 @@ jobs:
- name: Commit version change
run: |
git config --global user.email "github-tracker-bot@taplytics.com"
git config --global user.email "foundation-admin@devcycle.com"
git config --global user.name "DevCycle Automation"
git add ./lib/devcycle-ruby-server-sdk/version.rb
git commit -m "Release ${{steps.prepare-release.outputs.next-release-tag}}"
Expand All @@ -69,15 +71,7 @@ jobs:
bundler-cache: true

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
uses: rubygems/release-gem@v1
if: inputs.prerelease != true && inputs.draft != true

- uses: DevCycleHQ/release-action/create-release@v2.3.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
ruby-version: [ '3.1.0', '3.2.0', '3.3.0' ]
env:
DEVCYCLE_SERVER_SDK_KEY: ${{ secrets.DEVCYCLE_SERVER_SDK_KEY_UNIT_TESTS }}
DEVCYCLE_SERVER_SDK_KEY: dvc_server_token_hash
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
Expand Down
4 changes: 2 additions & 2 deletions spec/api/devcycle_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@
# @return [Variable]
describe 'get_variable_by_key test' do
it 'should work' do
result = @api_instance.variable(@user, "ruby-example-tests", false)
result = @api_instance.variable(@user, "test", false)
expect(result.isDefaulted).to eq false
expect(result.value).to eq true

result = @api_instance.variable_value(@user, "ruby-example-tests", true)
result = @api_instance.variable_value(@user, "test", true)
expect(result).to eq true
end
end
Expand Down

0 comments on commit e620735

Please sign in to comment.