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

@rimac-technology/semantic-release-s3

v2.4.0

Published

Semantic-release plugin to push files and folders to AWS S3 bucket

Downloads

97

Readme

@rimac-technology/semantic-release-s3

semantic-release plugin to push files and folders to AWS S3 bucket

Commitizen friendly Conventional Changelog semantic-release: angular

| Step | Description | | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | verifyConditions | Verify the presence of the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY environment variables and bucketConfiguration and directoryPathplugin options | | publish | Upload selected files and directories to the S3 bucket |

# For npm users
$ npm install --save-dev @rimac-technology/semantic-release-s3

# For yarn users
$ yarn add --dev @rimac-technology/semantic-release-s3

Usage

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

{
    "plugins": [
        "@semantic-release/commit-analyzer",
        "@semantic-release/release-notes-generator",
        "@semantic-release/npm",
        [
            "@rimac-technology/semantic-release-s3",
            {
                "s3Bucket": {
                    "branchName": "s3-bucket-name"
                },
                "directoryPath": "directoryName/**/*"
            }
        ]
    ]
}

Configuration

Environment variables

| Variable | Description | Required | | ----------------------- | ----------------- | :------: | | AWS_ACCESS_KEY_ID | AWS access key id | ✓ | | AWS_SECRET_ACCESS_KEY | AWS secret key | ✓ |

If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY can not be set, you can set custom variables and override them in plugin options with accessKeyName and secretAccessKeyName.

Options

| Options | Description | Default | Required | | ------------------------ | ------------------------------------------------------------------------------------------------------- | :-----: | :------: | | awsAccessKeyName | Environmental variable name that is used to override AWS_ACCESS_KEY_ID | | | | awsSecretAccessKeyName | Environmental variable name that is used to override AWS_SECRET_ACCESS_KEY | | | | s3Bucket | S3 bucket configuration can be defined per git branch or a single bucket | | ✓ | | objectACL | S3 object ACL ("private"|"public-read"|"public-read-write"|"authenticated-read"...) | | | | directoryPath | Path to directory which will be uploaded to the bucket | | ✓ | | removeDirectoryRoot | Flag that determines will the root directory of the given directoryPath be removed | false | | | removeDiff | Flag that determines will the file diff which should be uploaded vs files already on s3 will be deleted | true | |

s3Bucket option

The s3Bucket name can contain variable, is is parsed with Lodash template. The following variables are available:

| Parameter | Description | | -------------- | ------------------------------------------------------------------------------------ | | branch.name | The branch name. | | lastRelease | Object with version, gitTag and gitHead of the last release. | | nextRelease | Object with version, gitTag, gitHead and notes of the release being done. |

s3Bucket examples

The s3Bucket my-bucket/${nextRelease.version} will generate push your object to this path:

my-bucket/v1.0.0/[your-directory-content]

Example

{
    "plugins": [
        "@semantic-release/commit-analyzer",
        "@semantic-release/release-notes-generator",
        "@semantic-release/npm",
        [
            "@rimac-technology/semantic-release-s3",
            {
                "awsAccessKeyName": "ACCESS_KEY_ENV_VARIABLE_NAME",
                "awsSecretAccessKeyName": "SECRET_ACCESS_KEY_ENV_VARIABLE_NAME",
                "s3Bucket": "s3-bucket-name",
                "objectACL": "public-read",
                "directoryPath": "directoryName/**/*",
                "removeDirectoryRoot": true,
                "removeDiff": false
            }
        ]
    ]
}