npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

semantic-release-codeartifact

v2.0.18

Published

semantic-release plugin for AWS CodeArtifact

Downloads

6,916

Readme

Semantic Release CodeArtifact

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

A semantic-release plugin for publishing packages to AWS CodeArtifact.

Automate your entire package release workflow including: determining the next version number, generating release notes, and publishing packages to CodeArtifact using this plugin with semantic-release.

Table of Contents

Install

npm install -D semantic-release semantic-release-codeartifact

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["semantic-release-codeartifact", {
      "tool": "npm",
      "domain": "<YOUR_DOMAIN>",
      "repository": "<YOUR_REPOSITORY>"
    }],
    "@semantic-release/npm",
    "@semantic-release/github"
  ]
}

See Additional Usage for details on using other tools with this plugin.

Demo

Check out this example repo to see it in action.

Requirements

In order to use semantic-release you need:

In order to use semantic-release-codeartifact you need:

IAM Policy for Publishing

The IAM role used by your CI environment will need the following permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "codeartifact:GetAuthorizationToken",
        "codeartifact:GetRepositoryEndpoint",
        "codeartifact:PublishPackageVersion"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "sts:GetServiceBearerToken",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "sts:AWSServiceName": "codeartifact.amazonaws.com"
        }
      }
    }
  ]
}

Configuration

AWS Environment variables

The AWS configuration is required for the AWS SDK which is used for getting an auth token for CodeArtifact.

| Variable | Description | | ----------------------- | -------------------------------------------------------- | | AWS_REGION | Required. The AWS region to be used with the AWS SDK | | AWS_ACCESS_KEY_ID | Required. Your AWS Access Key | | AWS_SECRET_ACCESS_KEY | Required. Your AWS Secret Access Key | | AWS_SESSION_TOKEN | Session token if you have/need it |

Note: Proxy configurations are supported and will be used if HTTP_PROXY or HTTPS_PROXY is found on the environment using aws-sdk-v3-proxy.

Plugin environment variables

The following environment variables can be set to configure the plugin. Options specified by plugin config will take precedence over these environment variables.

| Variable | Description | | -------------------- | ---------------------------------------------------------------------- | | SR_CA_TOOL | Tool to connect with the CodeArtifact repository | | SR_CA_DOMAIN | Your CodeArtifact domain name | | SR_CA_REPOSITORY | Your CodeArtifact repository name | | SR_CA_DOMAIN_OWNER | The AWS Account ID that owns your CodeArtifact domain | | SR_CA_DURATION_SEC | The time, in seconds, that login information for CodeArtifact is valid |

Options

| Option | Description | Default | | ------------------ | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | tool | Required. Tool to connect with the CodeArtifact repository | SR_CA_TOOL environment variable. | | domain | Required. Your CodeArtifact domain name | SR_CA_DOMAIN environment variable. | | repository | Required. Your CodeArtifact repository name | SR_CA_REPOSITORY environment variable. | | domainOwner | The AWS Account ID that owns your CodeArtifact domain | SR_CA_DOMAIN_OWNER environment variable. | | durationSections | The time, in seconds, that login information for CodeArtifact is valid | 7200 (2 hours) | | skipPluginCheck | Skips the check for required plugins, this can be used if you are using your own custom plugins for your specified tool | false |

Lifecycle Hooks

| Step | Description | | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | verifyConditions | Verify the presence and the validity of the authentication (set via configuration), and provide authentication values to the semantic-release plugin related to the CodeArtifact tool being used |

Recipes

CI Configurations

  • GitHub Actions
  • GitLab (coming soon - PRs welcome)
  • CircleCI (coming soon - PRs welcome)

Additional Usage

CodeArtifact supports multiple tools including npm (JavaScript), Maven and Gradle (Java), and pip (Python). Each contain different dependencies and are listed below.

JavaScript - npm

Required dependencies:

npm install --save-dev semantic-release semantic-release-codeartifact

Plugin Configuration with npm

semantic-release includes the other plugins listed below:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["semantic-release-codeartifact", {
      "tool": "npm",
      "domain": "<YOUR_DOMAIN>",
      "repository": "<YOUR_REPOSITORY>"
    }],
    "@semantic-release/npm",
    "@semantic-release/github"
  ]
}

Note: semantic-release-codeartifact must be listed before @semantic-release/npm

Python - pip

Support for pip coming soon

Java - Maven

Support for Maven coming soon

Java - Gradle

Support for Gradle coming soon

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!