diff --git a/.github/scripts/deploy-to-docker.sh b/.github/scripts/deploy-to-docker.sh deleted file mode 100755 index 5148abcce3..0000000000 --- a/.github/scripts/deploy-to-docker.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -set -e - -# change to the project root -cd "$(dirname "$0")/../.." - -# read the nextflow version -read -r NF_VERSION /dev/null 2>&1 \ && release_exists=true # if not exists, create github release, with zip & meta json files - if [[ $release_exists ]]; then + if [[ $release_exists == true ]]; then echo "Plugin $plugin_name $plugin_version already deployed to github, skipping" else gh release create \ diff --git a/.github/scripts/deploy-plugins-to-maven.sh b/release/deploy-plugins-to-maven.sh similarity index 73% rename from .github/scripts/deploy-plugins-to-maven.sh rename to release/deploy-plugins-to-maven.sh index 114129caba..238093625a 100755 --- a/.github/scripts/deploy-plugins-to-maven.sh +++ b/release/deploy-plugins-to-maven.sh @@ -2,9 +2,13 @@ set -e # change to the project root -cd "$(dirname "$0")/../.." +cd "$(dirname "$0")/.." -echo "Publishing plugins to maven" +echo " +--------------------------------- +-- Publishing plugins to maven -- +--------------------------------- +" # the release process should have already built the jars, so to avoid re-compiling everything # we can tell gradle to skip all non publish/publication related tasks diff --git a/release/deploy-to-docker.sh b/release/deploy-to-docker.sh new file mode 100755 index 0000000000..4779582f73 --- /dev/null +++ b/release/deploy-to-docker.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +set -e + +# change to the project root +cd "$(dirname "$0")/.." + +# read the nextflow version +read -r NF_VERSION /dev/null 2>&1 \ && release_exists=true -if [[ $release_exists ]]; then +if [[ $release_exists == true ]]; then echo "Version $NF_VERSION already deployed to S3, skipping" exit fi diff --git a/release/main.sh b/release/main.sh new file mode 100644 index 0000000000..2ecee62fe1 --- /dev/null +++ b/release/main.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +set -e + +# ----------------------------------------------------------------------------- +# Nextflow release script +# +# This is the orchestration script for Nextflow releases. +# +# It is intended to be run by 'headless' CI environments (eg Github Actions) +# to execute a release.You probably don't want to run this script directly. +# +# Instead, use the `make release` command to be guided through the process. +# ----------------------------------------------------------------------------- + +# set defaults for unspecified env vars +export GH_ORG=${GH_ORG:-'nextflow-io'} +export GH_USER=${GH_USER:-'pditommaso'} # TODO - use a service user for releases +export GH_USER_EMAIL=${GH_USER_EMAIL:-'paolo.ditommaso@gmail.com'} + +export MAVEN_PUBLISH_URL=${MAVEN_PUBLISH_URL:-'s3://maven.seqera.io'} +export PLUGINS_INDEX_JSON=${PLUGINS_INDEX_JSON:-'https://github.com/nextflow-io/plugins/main/plugins.json'} +export S3_RELEASE_BUCKET=${S3_RELEASE_BUCKET:-'www2.nextflow.io'} +export SEQERA_CONTAINER_REGISTRY=${SEQERA_CONTAINER_REGISTRY:-'public.cr.seqera.io'} + +# change to the project root +cd "$(dirname "$0")/.." + +# build artifacts +make distribution + +# tag release +./release/tag-release.sh + +# deploy to maven +./release/deploy-to-maven.sh + +# deploy to S3 +./release/deploy-to-s3.sh + +# deploy to docker +./release/deploy-to-docker.sh + +# deploy to github +./release/deploy-to-github.sh + +# deploy plugins +./release/deploy-plugins-to-maven.sh +./release/deploy-plugins-to-github.sh +./release/update-plugins-index.sh + +# finally, publish the new launcher +./release/publish-launcher-script.sh diff --git a/.github/scripts/publish-release.sh b/release/publish-launcher-script.sh similarity index 68% rename from .github/scripts/publish-release.sh rename to release/publish-launcher-script.sh index ffbd319be6..7ee69ec937 100755 --- a/.github/scripts/publish-release.sh +++ b/release/publish-launcher-script.sh @@ -2,12 +2,18 @@ set -e # change to the project root -cd "$(dirname "$0")/../.." +cd "$(dirname "$0")/.." # read the nextflow version read -r NF_VERSION