Skip to content

neo4j-contrib/s3-publish-gradle-plugin

Repository files navigation

S3 Publish Plugin for Gradle

Build status Gradle Plugin

A plugin to publish files to Amazon S3.

Usage

import com.neo4j.gradle.s3.S3UploadTask

plugins {
  id('com.neo4j.gradle.s3.S3UploadTask')
}

s3 {
    profile = 'neo4j'
    region = 'us-east-1'
}


task s3UploadImages(type: S3UploadTask) {
  //overwrite = true
  source = "${projectDir}/images"
  bucket = "dev.assets.neo4j.com"
  destination = "course/${project.name}/images"
  acl.set(CannedAccessControlList.PublicRead)
}

The above configuration will publish all images files from the images directory to the bucket dev.assets.neo4j.com. We also configure the destination path and the ACL to apply.

Publish a new version

The release process is automated and relies on GitHub Actions. We are using the 🤖 neo4j-oss-build account to publish on https://plugins.gradle.org.

The GRADLE_PUBLISH_KEY and GRADLE_PUBLISH_SECRET secrets are configured on GitHub. See the .github/workflows/release.yml file for details.

The release will be performed when a tag is pushed, the procedure is:

  1. Update the version in the build.gradle.kts file and commit

  2. Tag and push to master (don’t forget the v prefix and replace x.y.z with an actual version):

    $ git tag vx.y.z && git push origin master --tags