Blog

Announcing the Release of Cloudsmith CLI GitHub Action 🚀

Aug 30 2024/OIDC/2 min read
Picture of Bartosz Blizniak
by Bartosz Blizniak

We just released the Cloudsmith CLI GitHub Action. This new GitHub Action simplifies the process of installing and pre-authenticating the Cloudsmith CLI using OpenID Connect (OIDC) or an API Key. Whether managing packages, pushing artifacts, or automating your CI/CD workflows, this action is designed to streamline your experience and enhance your productivity.

Key Features and Benefits

1. Easy Installation of Cloudsmith CLI 📦

With this GitHub Action, you can effortlessly install the Cloudsmith CLI in your workflows. No more manual installations or complex setup processes. Simply add the action to your workflow, and the CLI will be ready to use.

2. Pre-Authentication with OIDC 🌐

One of the standout features of this action is its ability to pre-authenticate the Cloudsmith CLI using OIDC. By leveraging OIDC, you can securely authenticate without the need to manage API keys. This is particularly useful for organizations that prioritize security and want to minimize the exposure of sensitive credentials.

3. Support for API Key Authentication 🔑

In addition to OIDC, the action also supports authentication using an API Key. This provides flexibility for users who prefer or require API Key-based authentication. You can easily switch between authentication methods based on your needs.

4. Customizable Inputs 🛠️

The action comes with several customizable inputs, allowing you to tailor the setup to your specific requirements. You can specify the CLI version, provide the OIDC namespace and service slug, set the API Key, and more. This level of customization ensures that the action fits seamlessly into your existing workflows.

5. Seamless Integration with GitHub Actions 🤝

Designed to work seamlessly with GitHub Actions, this action integrates smoothly into your CI/CD pipelines. Whether you are building, testing, or deploying, the Cloudsmith CLI GitHub Action enhances your workflow automation and efficiency.

Example Usage

Using OIDC for Authentication

name: Install Cloudsmith CLI with OIDC

on: [push]
permissions:
  id-token: write
jobs:
  install-cloudsmith-cli:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install Cloudsmith CLI
        uses: cloudsmith-io/cloudsmith-cli-action@v1.0.0
        with:
          oidc-namespace: 'your-oidc-namespace'
          oidc-service-slug: 'your-service-account-slug'

      - name: Verify Cloudsmith CLI Installation
        run: |
          cloudsmith --version

Using API Key for Authentication

name: Install Cloudsmith CLI with API Key

on: [push]

jobs:
  install-cloudsmith-cli:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install Cloudsmith CLI
        uses: cloudsmith-io/cloudsmith-cli-action@v1.0.0
        with:
          api-key: ${{ secrets.CLOUDSMITH_API_KEY }}

      - name: Verify Cloudsmith CLI Installation
        run: |
          cloudsmith --version

Get Started Today!

Ready to enhance your GitHub Actions workflows with the Cloudsmith CLI? Check out the GitHub repository for more details and start integrating the action into your projects today.

For more information on Cloudsmith and its features, visit the Cloudsmith documentation.

Happy automating! 🚀


For any questions or feedback, feel free to open an issue on the GitHub repository or reach out to the maintainers. Thank you for your support!

Get our next blog straight to your inbox