Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tapan-sh committed Jun 20, 2024
1 parent 89524e2 commit 6909173
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
test:
runs-on: ubuntu-latest

env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile

strategy:
matrix:
# ruby-version: ['2.7', '3.0', '3.1', '3.2']
Expand Down
23 changes: 23 additions & 0 deletions publish-gem.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Check if the GitHub reference starts with 'refs/tags/v' or 'refs/tags/build-'
# if [[ $GITHUB_REF_VALUE == refs/tags/v* ]] || [[ $GITHUB_REF_VALUE == refs/tags/build-* ]]; then
GEMS_PATH="pkg/*.gem"
RUBYGEMS_HOST="https://sageonegems.jfrog.io/artifactory/api/gems/gems-local"
JFROG_USER="JFROG_USER_VALUE"
JFROG_PASS="JFROG_PASS_VALUE"

# Clear any existing packages
rm -f $GEMS_PATH

# Retrieve credentials
mkdir -p $HOME/.gem
curl -u $JFROG_USER:$JFROG_PASS $RUBYGEMS_HOST/api/v1/api_key.yaml > $HOME/.gem/credentials
chmod 600 $HOME/.gem/credentials

# Build gem
bundle exec rake build

# Publish
# gem push $GEMS_PATH
# fi

0 comments on commit 6909173

Please sign in to comment.