Skip to content

Commit

Permalink
chore: prep for rubygems push
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Dec 26, 2023
1 parent 38c99ec commit 56932a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/package-sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
permissions:
contents: write

env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}

jobs:
build:
runs-on: ubuntu-latest
Expand Down
8 changes: 1 addition & 7 deletions build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,9 @@ func rubyBuild(ctx context.Context, client *dagger.Client, hostDirectory *dagger

gemHostAPIKeySecret := client.SetSecret("rubygems-api-key", os.Getenv("RUBYGEMS_API_KEY"))

gemHost := os.Getenv("RUBYGEMS_HOST")
if gemHost == "" {
// TODO: remove this when we push to rubygems.org
return fmt.Errorf("RUBYGEMS_HOST is not set")
}

_, err = container.
WithSecretVariable("GEM_HOST_API_KEY", gemHostAPIKeySecret).
WithExec([]string{"gem", "push", "--host", fmt.Sprintf("%s://%s", protocol, gemHost), "/app/pkg/flipt_client-*.gem"}).
WithExec([]string{"gem", "push", "/app/pkg/flipt_client-*.gem"}).
Sync(ctx)

return err
Expand Down

0 comments on commit 56932a6

Please sign in to comment.