Skip to content

Commit ac3bcc7

Browse files
committed
fixed up deploy ci-cd
1 parent d600466 commit ac3bcc7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci-cd.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ jobs:
351351
needs: [devcheck, test, deploy-fileformats, deploy-fileformats-extras]
352352
runs-on: ubuntu-latest
353353
steps:
354+
355+
- name: Set up Git user
356+
run: |
357+
git config --local user.email "[email protected]"
358+
git config --local user.name "GitHub Action"
359+
354360
- name: Download version file
355361
uses: actions/download-artifact@v2
356362
with:
@@ -372,6 +378,25 @@ jobs:
372378
run: |
373379
sed -i '/\/pydra\/tasks\/mrtrix3\/${{ env.SUBPKG_NAME }}/d' .gitignore
374380
381+
- name: Add auto-generated directory to git repo
382+
if: github.event_name == 'release' || github.event_name == 'repository_dispatch'
383+
run: |
384+
git add pydra/tasks/mrtrix3/$SUBPKG_NAME
385+
git commit -am"added auto-generated version to make new tag for package version"
386+
git status
387+
388+
- name: Get latest version tag
389+
id: latest_tag
390+
run: |
391+
git fetch --tags
392+
echo "TAG=$(git tag -l | grep 'v.*' | tail -n 1 | awk -F post '{print $1}')" >> $GITHUB_OUTPUT
393+
394+
- name: Overwrite the tag of release event with latest commit (i.e. including the auto directory)
395+
if: github.event_name == 'release'
396+
run: |
397+
git tag -d ${{ steps.latest_tag.outputs.TAG }};
398+
git tag -a ${{ steps.latest_tag.outputs.TAG }} -m"Tag used to create a pydra-mrtrix3 $MRTRIX_VERSION release";
399+
375400
- name: Set up Python 3.11
376401
uses: actions/setup-python@v2
377402
with:

0 commit comments

Comments
 (0)