Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Use rubygems OIDC #111

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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
Loading