Build: transition to maven central deployment. #34
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # When NDStorage, AcqEngJ, or NDViewer update, a automatic push | ||
| # to the dependency-update branch of pycro-manager will be generated | ||
| # that updates the version in their POM.xml files | ||
| # This script should then: | ||
| # 1) Update the minor or patch version of PMJava accordingly | ||
| # 2) Open a pull request from the dependency branch to the main branch to | ||
| # trigger automatic build of pycro-manager Java | ||
| name: Pycro-ManagerJava update | ||
| on: | ||
| push: | ||
| branches: | ||
| - dependency-update | ||
| paths: | ||
| - 'java/pom.xml' | ||
| jobs: | ||
| update-pycromanger-java: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Pycro-Manager dependencies branch | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| path: '' | ||
| repository: micro-manager/pycro-manager | ||
| ref: dependencies | ||
| fetch-depth: 0 # check out all branches so main can be merged | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| ref: dependency-update | ||
| - name: update-version | ||
| run: | | ||
| # fast forward to get code updates on main branch | ||
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
| git config --local user.name "PycroManager-Bot" | ||
| git config pull.rebase false | ||
| git merge origin/main -m "dependency update merge" | ||
| pip install semantic_version | ||
| python build_automation/update_PycroManagerJava.py | ||
| - name: commit | ||
| run: | | ||
| git commit -am "update PycromanagerJava version" | ||
| - name: push | ||
| run: | | ||
| git pull # Get changes in case of simultaneous calls to script | ||
| git push https://henrypinkard:${{ secrets.GITHUB_TOKEN }}@github.com/micro-manager/pycro-manager.git | ||
| - name: create pull request | ||
| continue-on-error: true | ||
| run: | | ||
| gh pr create -H dependency-update -B main --title 'Java dependency auto-update' --body 'Created by Github action (https://github.com/micro-manager/pycro-manager/blob/dependency-update/.github/workflows/Java_dependency_update.yml)' | ||
| gh pr merge --auto --merge | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.PYCRO_TOKEN }} | ||