Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/Publish_NIMS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,20 @@ jobs:
working-directory: ./ni_measurementlink_generator

- name: Commit file changes
id: commit
if: ${{ startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/') }}
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Promote NIMS package version and update Sphinx generated files in _docs" -a
echo "version_changed=false" >> $GITHUB_OUTPUT
if [ -n "$(git status --porcelain)" ]; then
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Promote NIMS and NIMG package version" -a
echo "version_changed=true" >> $GITHUB_OUTPUT
fi

- name: Push changes to the appropriate branch
if: ${{ startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/') }}
if: ${{ steps.commit.outputs.version_changed && (startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/')) }}
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.ADMIN_PAT }}
Expand Down