SourceSpring Nexus Artifact Upload GitHub Action
TECHNOLOGY
7/11/20253 min read
What is a Nexus Repository?
A Nexus Repository is a universal repository manager that allows developers to store, manage, and retrieve software artifacts. It acts as a central hub for managing dependencies and build artifacts in software development. Nexus supports a wide range of artifact formats, including Maven, npm, PyPI, Docker, and raw files, making it a versatile tool for managing software components.


Nexus Repository is commonly used in CI/CD pipelines to ensure that all dependencies and artifacts are versioned, stored securely, and easily accessible for future builds or deployments. It is available in two versions:
Nexus Repository OSS (Open Source): Free and open-source version.
Nexus Repository Pro: Paid version with additional enterprise features.
Why Do We Need to Upload Artifacts to an Artifact Manager?
An artifact manager like Nexus Repository plays a critical role in modern software development and DevOps practices. Here are some key reasons why uploading artifacts to an artifact manager is essential:
1. Centralized Storage
Artifact managers provide a centralized location to store all build artifacts, dependencies, and libraries.
This ensures that all team members and CI/CD pipelines have access to the same version of artifacts.
2. Version Control
Artifacts are versioned, allowing developers to track changes and roll back to previous versions if needed.
This is especially important for maintaining consistency across environments (e.g., development, staging, production).
3. Dependency Management
Nexus Repository can act as a proxy for public repositories (e.g., Maven Central, npm Registry), caching dependencies locally.
This reduces build times and ensures availability even if the public repository is down.
4. Improved Build Performance
By caching dependencies and storing artifacts locally, Nexus reduces the need to repeatedly download dependencies from external sources, speeding up builds.
5. Artifact Security
Nexus allows you to control access to artifacts using authentication and authorization mechanisms.
It also supports scanning artifacts for vulnerabilities, ensuring that only secure components are used in your projects.
6. Reproducible Builds
By storing all artifacts in a centralized repository, you can ensure that builds are reproducible. This is critical for debugging and compliance purposes.
7. Integration with CI/CD Pipelines
Artifact managers integrate seamlessly with CI/CD tools like Jenkins, GitHub Actions, and GitLab CI/CD.
This enables automated uploads of build artifacts and ensures that the latest versions are always available for deployment.
8. Support for Multiple Artifact Formats
Nexus supports a wide range of artifact formats, including:
Maven: For Java and JVM-based projects.
npm: For Node.js projects.
PyPI: For Python projects.
Docker: For container images.
Raw: For generic files like configuration files, binaries, etc.
SourceSpring Nexus Artifact Upload Action
The SourceSpring Nexus3 Upload Actionis a GitHub Action designed to upload artifacts (e.g., Maven JARs, npm packages, PyPI distributions, or raw files) to a Nexus3 repository. It simplifies the process of automating artifact uploads as part of your CI/CD workflows.
This action is highly configurable and supports multiple artifact formats, making it suitable for a wide range of use cases.
Features
Uploads artifacts to Nexus3 repositories.
Supports multiple artifact formats, including Maven, npm, PyPI, and raw files.
Securely integrates with GitHub Secrets for authentication.
Easy-to-use configuration with detailed input options.
Fully compatible with GitHub Actions workflows.
Getting Started
Prerequisites
GitHub Repository: Ensure you have a GitHub repository where you want to use this action.
Nexus3 Repository: Set up a Nexus3 repository to store your artifacts.
GitHub Secrets: Add the following secrets to your repository:
NEXUS_URL: The base URL of your Nexus repository.
NEXUS_USERNAME: The username for Nexus authentication.
NEXUS_PASSWORD: The password or token for Nexus authentication.
Usage
To use this action, create a workflow file in your repository (e.g., .github/workflows/upload.yml) with the following content:
Maven and Python






Inputs
The following inputs are supported by this action: