Skip to content

Release Community Cromwell #14

Release Community Cromwell

Release Community Cromwell #14

name: Release Community Cromwell
on:
workflow_dispatch:
jobs:
cromwell-release:
name: Release Community Cromwell
runs-on: ubuntu-latest
steps:
- uses: sbt/setup-sbt@v1
# Only Cromwell admins should be permitted to run this action
- name: Enforce admin role
uses: prince-chrismc/check-actor-permissions-action@v3
with:
permission: admin
# `DSDEJENKINS_PASSWORD` auto syncs from vault with https://github.com/broadinstitute/terraform-ap-deployments/pull/614
# - name: Login to Docker Hub
# uses: docker/login-action@v1
# with:
# username: dsdejenkins
# password: ${{ secrets.DSDEJENKINS_PASSWORD }}
# - name: Find Cromwell release number
# run: |
# set -e
# previous_version=$(curl -X GET https://api.github.com/repos/broadinstitute/cromwell/releases/latest | jq .tag_name | xargs)
# if ! [[ "${previous_version}" =~ ^[0-9][0-9]+$ ]]; then
# exit 1
# fi
# echo "RELEASE_VERSION=$((previous_version + 1))" >> $GITHUB_ENV
# echo "NEXT_VERSION=$((previous_version + 2))" >> $GITHUB_ENV
- name: Clone Cromwell
uses: actions/checkout@v4
with:
repository: broadinstitute/cromwell
token: ${{ secrets.BROADBOT_GITHUB_TOKEN }}
path: cromwell
ref: develop
# fetch-depth 0 tells the action to include all past commits in the checkout.
# This is needed to smoothly perform the below merge of `develop` into `master`.
# Without the existing commits, git doesn't understand how the branches are
# related to each other.
fetch-depth: 0
- name: Create and push empty develop commit
run: |
set -e
cd cromwell
git config --global user.name "broadbot"
git config --global user.email "[email protected]"
git checkout develop
git commit --allow-empty -m "test commit"
git push origin develop
# - name: Merge to master and rev develop
# run: |
# set -e
# cd cromwell
#
# git config --global user.name "broadbot"
# git config --global user.email "[email protected]"
#
# echo 'Merge develop into master'
# git checkout --track origin/master
# git merge --no-edit develop
#
# echo "Update develop to version ${NEXT_VERSION}"
# git checkout develop
# sed -i -e '/cromwellVersion[[:space:]]=/s/[0-9][0-9]*/${NEXT_VERSION}/' project/Version.scala
# git add project/Version.scala
# git diff-index --quiet HEAD \
# || git commit --message "Update cromwell version from ${RELEASE_VERSION} to ${NEXT_VERSION}"
# - name: Prepare release notes
# run: |
# set -e
# cd cromwell
# sed -n "/## ${RELEASE_VERSION}/,/## [0-9]/p" CHANGELOG.md | sed '$d' > changelog.txt
#
# - name: Build jars for new release
# run: |
# set -e
# cd cromwell
# git checkout master
# # Use sbt.server.forcestart to workaround https://github.com/sbt/sbt/issues/6101
# echo 'Assemble jars for cromwell and womtool'
# sbt \
# -Dsbt.server.forcestart=true \
# -Dproject.version=${RELEASE_VERSION} \
# -Dproject.isSnapshot=false \
# server/assembly \
# womtool/assembly
# - name: Push changes to origin
# run: |
# set -e
# cd cromwell
# git push origin develop master
# - name: Build and push Docker image
# run: |
# set -e
# cd cromwell
# git checkout master
# sbt -Dproject.isSnapshot=false -Dproject.isRelease=true dockerBuildAndPush
#
# - name: Create Github release
# uses: softprops/action-gh-release@v2
# with:
# body_path: cromwell/changelog.txt
# tag_name: ${{ env.RELEASE_VERSION }}
# token: ${{ secrets.BROADBOT_GITHUB_TOKEN }}
# files: |
# cromwell/server/target/scala-2.13/cromwell-${{ env.RELEASE_VERSION }}.jar
# cromwell/womtool/target/scala-2.13/womtool-${{ env.RELEASE_VERSION }}.jar