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
13 changes: 8 additions & 5 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
################################################################################
sync-version:
runs-on: windows-latest
permissions:
contents: write
id-token: write

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -45,7 +48,7 @@ jobs:
echo "Branch version-sync-branch does not exist."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
# Create new branch and commit version change
- run: |
Expand All @@ -55,24 +58,24 @@ jobs:
git commit -am "ACTION_BOT: Sync version for release"
git push --set-upstream origin version-sync-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Close existing pull requests for version-sync-branch
- run: |
gh pr list --state open --head version-sync-branch --json number --jq '.[].number' | ForEach-Object { gh pr close $_ }
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
# Create pull request
- run: |
gh pr create --title "ACTION_BOT: Sync version for release" --body "Sync version for release" --base main --head version-sync-branch --label ACTION_BOT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Merge pull request
- run: |
$pr = gh pr list --head version-sync-branch --json number --jq '.[0].number'
gh pr merge $pr --squash --delete-branch --admin
env:
GITHUB_TOKEN: ${{ secrets.DF_COBOT_PAT_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh

build-ghusers:
Expand Down
Loading