2.4.0 • Published 1 year ago

@rimac-technology/semantic-release-s3 v2.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@rimac-technology/semantic-release-s3

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

Commitizen friendly Conventional Changelog semantic-release: angular

StepDescription
verifyConditionsVerify the presence of the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY environment variables and bucketConfiguration and directoryPathplugin options
publishUpload 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

VariableDescriptionRequired
AWS_ACCESS_KEY_IDAWS access key id
AWS_SECRET_ACCESS_KEYAWS 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

OptionsDescriptionDefaultRequired
awsAccessKeyNameEnvironmental variable name that is used to override AWS_ACCESS_KEY_ID
awsSecretAccessKeyNameEnvironmental variable name that is used to override AWS_SECRET_ACCESS_KEY
s3BucketS3 bucket configuration can be defined per git branch or a single bucket
objectACLS3 object ACL ("private""public-read""public-read-write""authenticated-read"...)
directoryPathPath to directory which will be uploaded to the bucket
removeDirectoryRootFlag that determines will the root directory of the given directoryPath be removedfalse
removeDiffFlag that determines will the file diff which should be uploaded vs files already on s3 will be deletedtrue

s3Bucket option

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

ParameterDescription
branch.nameThe branch name.
lastReleaseObject with version, gitTag and gitHead of the last release.
nextReleaseObject 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
            }
        ]
    ]
}
2.2.3

1 year ago

2.4.0

1 year ago

2.2.2

1 year ago

2.2.4

1 year ago

2.3.0

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.0.0

1 year ago

2.1.0

1 year ago

1.4.0

1 year ago

1.4.0-alpha.1

1 year ago

1.3.0-alpha.2

1 year ago

1.3.0

1 year ago

1.3.0-alpha.1

1 year ago

1.2.0

1 year ago

1.2.0-alpha.8

1 year ago

1.2.0-alpha.7

1 year ago

1.2.0-alpha.6

1 year ago

1.2.0-alpha.5

1 year ago

1.2.0-alpha.4

1 year ago

1.2.0-alpha.3

1 year ago

1.2.0-alpha.2

1 year ago

1.2.0-alpha.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

1.0.0-alpha.31

1 year ago

1.0.0-alpha.30

1 year ago

1.0.0-alpha.29

1 year ago

1.0.0-alpha.28

1 year ago

1.0.0-alpha.27

1 year ago

1.0.0-alpha.26

1 year ago

1.0.0-alpha.25

1 year ago

1.0.0-alpha.24

1 year ago

1.0.0-alpha.23

1 year ago

1.0.0-alpha.22

1 year ago

1.0.0-alpha.21

1 year ago

1.0.0-alpha.20

1 year ago

1.0.0-alpha.19

1 year ago

1.0.0-alpha.18

1 year ago

1.0.0-alpha.17

1 year ago

1.0.0-alpha.16

1 year ago

1.0.0-alpha.15

1 year ago

1.0.0-alpha.14

1 year ago

1.0.0-alpha.13

1 year ago

1.0.0-alpha.12

1 year ago

1.0.0-alpha.11

1 year ago

1.0.0-alpha.10

1 year ago

1.0.0-alpha.9

1 year ago

1.0.0-alpha.8

1 year ago

1.0.0-alpha.7

1 year ago

1.0.0-alpha.6

1 year ago

1.0.0-alpha.5

1 year ago

1.0.0-alpha.4

1 year ago

1.0.0-alpha.3

1 year ago

1.0.0-alpha.2

1 year ago

1.0.0-alpha.1

1 year ago