Fix git config so it is after checkout #9
This file contains 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
name: Auto version | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
jobs: | |
build: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: git config set up | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: bump version with tag-action but dry run | |
id: tag_action_dry_run | |
uses: anothrNick/github-tag-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DRY_RUN: true | |
- name: update files with bumped version from tag-action dry run | |
run: | | |
sed -i "s/String workflow_version = \"v.*/String workflow_version = \"${NEXT_VERSION}\"/" tasks/version_capture_task.wdl | |
- name: commit bumped version | |
run: | | |
git add tasks/version_capture_task.wdl | |
git commit -m "Auto bump version" | |
git push origin main | |
git checkout develop | |
git merge main | |
git push --set-upstream origin develop | |
- name: bump version with tag-action | |
uses: anothrNick/github-tag-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true |