Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

120 Commits

Repository files navigation

⚠️ Repository Archived

This repository is archived and no longer maintained. Please use our new supported Cloudsmith GitHub Action instead: https://github.com/cloudsmith-io/cloudsmith-cli-action


Cloudsmith Push Action

Push packages easily to your Cloudsmith repositories, using the Cloudsmith CLI.

Cloudsmith CLI and Executable

This action now supports both the Cloudsmith CLI and the new Cloudsmith executable. The Cloudsmith executable allows you to use Cloudsmith without needing to install it via pip, making it easier to integrate into your workflows.

From v0.6.9, we default the action to use the executable instead of having to install python, if you wish to use the old workflow, you can do so by specifying executable: "false". This will attempt to download python and use pip to install the Cloudsmith-cli instead.

...
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "maven"owner: "cloudsmith"repo: "actions"republish: "true"file: "test/fixture/cloudsmith-maven-example-1.0.0.jar"executable: "false"# Add this to use pip instead

Supported:

Not Supported, But May Work:

  • Push:
    • Other package formats may work but official support has not yet been added to the Action.

Please feel free to contribute pull requests to add additional support!

Learn more about hosting format registries at Cloudsmith:

Alpine | Cargo | CocoaPods | Composer | Dart | Debian | Docker | Go | Helm | Hex | Maven | npm | NuGet | Python | RedHat/RPM | Raw

Cloudsmith API Key

The API key is required for the cloudsmith-cli to work.

Obtain the API Key from Cloudsmith user settings. You should use a least-privilege account for Continuous Integration.

Add a secret named CLOUDSMITH_API_KEY and a value of the API Key obtained from cloudsmith. Secrets are maintained in the settings of each repository.

Pass your secret to the Action as seen in the Example usage.

Examples

The following examples use static files located within test/fixtures. When republishing existing packages the republish flag must be set to true, but is otherwise recommended to not use this since it overwrites (and causes longer publish times).

To pin to a specific release of this Github Action, replace use: cloudsmith-io/action@master with the version you require e.g. uses: cloudsmith-io/action@0.4.0.

You can also add "tags" to your upload process by specifying tags in your workflow, this is a comma separated string. (Some special characters like : are not allowed).

Alpine Package Push

name: Push Alpineon: pushjobs:
push:
runs-on: ubuntu-latestname: Alpine Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "alpine"owner: "cloudsmith"repo: "actions"distro: "alpine"release: "v3.9"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-alpine-example-1.0.0-r0.apk"tags: "tag1, tag2, tag3"

Cargo Crate Push

name: Push Cargoon: pushjobs:
push:
runs-on: ubuntu-latestname: Cargo Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "cargo"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-cargo-example-0.1.0.crate"

Composer Package Push

name: Push Composeron: pushjobs:
push:
runs-on: ubuntu-latestname: Composer Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "composer"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-composer-package-archive-0.1.0.zip"tags: "tag1, tag2, tag3"

CocoaPods Package Push

name: Push Cocoapodson: pushjobs:
push:
runs-on: ubuntu-latestname: Cocoapods Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "cocoapods"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-cocoapods-example-1.0.0.zip"tags: "tag1, tag2, tag3"

Dart Package Push

name: Push Darton: pushjobs:
push:
runs-on: ubuntu-latestname: Dart Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "dart"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-dart-example-1.0.0.tar.gz"

Debian Package Push

name: Push Debianon: pushjobs:
push:
runs-on: ubuntu-latestname: Debian Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "deb"owner: "cloudsmith"repo: "actions"distro: "ubuntu"release: "xenial"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-debian-example_1.0.0_amd64.deb"

Docker Image Push

Note: In most cases, it is better to use the native docker cli to push images to the Cloudsmith Repository. Search the Marketplace for many supporting implementations.

See push-docker.yml

name: Push Dockeron: pushjobs:
push:
runs-on: ubuntu-latestname: Docker Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "docker"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/alpine-docker-test.tar.gz"

GO Push

name: Push GOon: pushjobs:
push:
runs-on: ubuntu-latestname: Go Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: ./with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "go"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-go-example.zip"#real file that will repeat versions

Helm Chart Push

name: Push Helmon: pushjobs:
push:
runs-on: ubuntu-latestname: Helm Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: ./with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "helm"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-chart-example-1.0.0.tar.gz"#real file that will repeat versions

Hex Push

name: Push Hexon: pushjobs:
push:
runs-on: ubuntu-latestname: Hex Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: ./with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "hex"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-hex-example-1.0.0.tar"#real file that will repeat versions

Maven Package Push

name: Push Mavenon: pushjobs:
push:
runs-on: ubuntu-latestname: Maven Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: ./with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "maven"owner: "cloudsmith"repo: "actions"pom-file: "test/fixture/cloudsmith-maven-example-1.0-SNAPSHOT.pom"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-maven-example-1.0-SNAPSHOT.jar"#real file that will repeat versions

NPM Package Push

name: Push NPMon: pushjobs:
push:
runs-on: ubuntu-latestname: NPM Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: ./with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "npm"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-npm-example-1.0.0.tgz"#real file that will repeat versions

Nuget Package Push

name: Push Nugeton: pushjobs:
push:
runs-on: ubuntu-latestname: Nuget Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: ./with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "nuget"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-nuget-example.1.0.0.nupkg"#real file that will repeat versionssymbols-file: "test/fixture/cloudsmith-nuget-example.1.0.0.snupkg"

Python Package Push

name: Push Pythonon: pushjobs:
push:
runs-on: ubuntu-latestname: Python Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "python"owner: "cloudsmith"repo: "actions"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-python-example-1.0.0.tar.gz"

RedHat/RPM Package Push

name: Push RedHat/RPMon: pushjobs:
push:
runs-on: ubuntu-latestname: RedHat/RPM Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "rpm"owner: "cloudsmith"repo: "actions"distro: "any-distro"version: "any-version"republish: "true"# needed ONLY if version is not changingfile: "test/fixture/cloudsmith-rpm-example-1.0-1.x86_64.rpm"#real file that will repeat versions

Raw File Push

name: Push Rawon: pushjobs:
push:
runs-on: ubuntu-latestname: Raw File Push Demosteps:
- uses: actions/checkout@v4
- name: Pushid: pushuses: cloudsmith-io/action@masterwith:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}command: "push"format: "raw"owner: "cloudsmith"repo: "actions"file: "test/fixture/raw_file.txt"name: "Raw Test"summary: "Github Action test of raw pushes"description: "See https://github.com/cloudsmith-io/action"version: ${{ github.sha}}

Thanks

A huge thank you to @aroller (Aaron) at @AutoModality for creating the original GitHub action for Cloudsmith.

Contributing

Yes! Please do contribute, this is why we love open source. Please see CONTRIBUTING.md for contribution guidelines when making code changes or raising issues for bug reports, ideas, discussions and/or questions (i.e. help required).

EOF

This quality product was brought to you by Cloudsmith and the fine folks who have contributed.

About

Github Action that uses the cloudsmith cli to interact with the Cloudsmith API (pushes, etc)

Topics

Resources

Contributing

Stars

16 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages