Skip to content

Commit

Permalink
Fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
sylhare committed Jul 31, 2023
1 parent 62f96ea commit 5098c46
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 50 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Publish build

on:
workflow_dispatch:
push:
tags:
- v*
Expand Down Expand Up @@ -28,3 +29,26 @@ jobs:
run: |
gem build *.gemspec
echo `find . -name "*.gem" | tail -1 | awk -F"[/]" '{print $2}'`
- name: Publish to GPR
continue-on-error: true
run: |
echo ${{ github.repository_owner }}
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}

- 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
wc -l $HOME/.gem/credentials
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
50 changes: 0 additions & 50 deletions .github/workflows/publish-deploy.yml

This file was deleted.

0 comments on commit 5098c46

Please sign in to comment.