From ac3bcc7d0ca30b2a90698ad4ce9b42c5b6aeef16 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Wed, 29 May 2024 15:02:53 +0930 Subject: [PATCH] fixed up deploy ci-cd --- .github/workflows/ci-cd.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c35e459..b28932f 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -351,6 +351,12 @@ jobs: needs: [devcheck, test, deploy-fileformats, deploy-fileformats-extras] runs-on: ubuntu-latest steps: + + - name: Set up Git user + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + - name: Download version file uses: actions/download-artifact@v2 with: @@ -372,6 +378,25 @@ jobs: run: | sed -i '/\/pydra\/tasks\/mrtrix3\/${{ env.SUBPKG_NAME }}/d' .gitignore + - name: Add auto-generated directory to git repo + if: github.event_name == 'release' || github.event_name == 'repository_dispatch' + run: | + git add pydra/tasks/mrtrix3/$SUBPKG_NAME + git commit -am"added auto-generated version to make new tag for package version" + git status + + - name: Get latest version tag + id: latest_tag + run: | + git fetch --tags + echo "TAG=$(git tag -l | grep 'v.*' | tail -n 1 | awk -F post '{print $1}')" >> $GITHUB_OUTPUT + + - name: Overwrite the tag of release event with latest commit (i.e. including the auto directory) + if: github.event_name == 'release' + run: | + git tag -d ${{ steps.latest_tag.outputs.TAG }}; + git tag -a ${{ steps.latest_tag.outputs.TAG }} -m"Tag used to create a pydra-mrtrix3 $MRTRIX_VERSION release"; + - name: Set up Python 3.11 uses: actions/setup-python@v2 with: