Skip to content

Commit 33b9746

Browse files
ruby publish action
1 parent 29b5dcd commit 33b9746

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/release-ruby.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,15 @@ jobs:
4141
bundle install
4242
python ../devops/build_sdks.py --github-token=${{ secrets.API_GITHUB_TOKEN }} --package-version=${{ github.event.inputs.packageVersion }}
4343
gem build *.gemspec
44+
45+
mkdir -p $HOME/.gem
46+
touch $HOME/.gem/credentials
47+
chmod 0600 $HOME/.gem/credentials
48+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
49+
gem build *.gemspec
50+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
4451
shell: pwsh
4552
working-directory: ruby
46-
- name: Publish gem
47-
uses: dawidd6/[email protected]
48-
with:
49-
api_key: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
50-
github_token: ${{secrets.GITHUB_TOKEN}}
53+
env:
54+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
55+
OWNER: ${{ github.repository_owner }}

0 commit comments

Comments
 (0)