diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..35e0c220e2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +# This Workflow performs a release of che docs +name: Release Che Dashboard +on: + workflow_dispatch: + inputs: + version: + description: 'The version that is going to be released. Should be in format 7.y.z' + required: true + default: '7.y.z' +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Create Release + run: | + git config --global user.name "Mykhailo Kuznietsov" + git config --global user.email "mkuznets@redhat.com" + export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} + /bin/bash make-release.sh --version ${{ github.event.inputs.version }} --trigger-release diff --git a/make-release.sh b/make-release.sh index 3037439ea3..6d64ea1999 100755 --- a/make-release.sh +++ b/make-release.sh @@ -70,13 +70,7 @@ else BASEBRANCH="${BRANCH}" fi -# work in tmp dir -TMP=$(mktemp -d); pushd "$TMP" > /dev/null || exit 1 - # get sources from ${BASEBRANCH} branch -echo "Check out ${REPO} to ${TMP}/${REPO##*/}" -git clone "${REPO}" -q -cd "${REPO##*/}" || exit 1 git fetch origin "${BASEBRANCH}":"${BASEBRANCH}" git checkout "${BASEBRANCH}" @@ -121,8 +115,3 @@ fi [[ $VERSION =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]] && BASE="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"; NEXT="${BASH_REMATCH[3]}"; (( NEXT=NEXT+1 )) # for VERSION=7.7.1, get BASE=7.7, NEXT=2 NEXTVERSION_Z="${BASE}.${NEXT}-SNAPSHOT" bump_version ${NEXTVERSION_Z} ${BRANCH} - -popd > /dev/null || exit - -# cleanup tmp dir -cd /tmp && rm -fr "$TMP"