Skip to content

Commit 96dcad7

Browse files
committed
Update workflow to create GitHub issue for CLI version
- 📝 Generate issue content file for CLI version updates - 🔧 Create GitHub issue instead of PR for version updates - 📄 Include current and latest version details in the issue -Priyanshu
1 parent 59d0158 commit 96dcad7

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

.github/workflows/update-pac-cli-version.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,25 @@ jobs:
4646
echo "update_needed=false" >> $GITHUB_OUTPUT
4747
fi
4848
49-
- name: Update gulpfile.mjs with new CLI version
49+
- name: Generate issue content file
5050
if: steps.compare_versions.outputs.update_needed == 'true'
5151
run: |
52-
sed -i "s/const cliVersion = '[0-9.]*'/const cliVersion = '${{ steps.get_latest_version.outputs.latest_version }}'/" gulpfile.mjs
52+
echo "A new version of Microsoft.PowerApps.CLI is available on NuGet." > .github/cli-update-issue-template.md
53+
echo "" >> .github/cli-update-issue-template.md
54+
echo "Current version in gulpfile.mjs: ${{ steps.get_current_version.outputs.current_version }}" >> .github/cli-update-issue-template.md
55+
echo "Latest version on NuGet: ${{ steps.get_latest_version.outputs.latest_version }}" >> .github/cli-update-issue-template.md
56+
echo "" >> .github/cli-update-issue-template.md
57+
echo "Please update the CLI version in the repository." >> .github/cli-update-issue-template.md
58+
echo "" >> .github/cli-update-issue-template.md
59+
echo "For implementation reference, see PR #1236." >> .github/cli-update-issue-template.md
5360
54-
- name: Create Pull Request to update CLI version
61+
- name: Create GitHub issue to update CLI version and assign to Copilot
5562
if: steps.compare_versions.outputs.update_needed == 'true'
56-
uses: peter-evans/create-pull-request@v6
63+
uses: peter-evans/create-issue-from-file@v5
5764
with:
58-
commit-message: "chore: update PowerApps CLI version to ${{ steps.get_latest_version.outputs.latest_version }}"
59-
title: "chore: update PowerApps CLI version to ${{ steps.get_latest_version.outputs.latest_version }}"
60-
body: |
61-
This PR updates the PowerApps CLI version in `gulpfile.mjs` from ${{ steps.get_current_version.outputs.current_version }} to ${{ steps.get_latest_version.outputs.latest_version }}.
62-
63-
For implementation reference, see PR #1236.
64-
65-
_Automated PR generated by GitHub Actions._
66-
branch: update/cli-version-${{ steps.get_latest_version.outputs.latest_version }}
67-
delete-branch: true
65+
title: "Update PowerApps CLI version to ${{ steps.get_latest_version.outputs.latest_version }}"
66+
content-filepath: .github/cli-update-issue-template.md
67+
labels: "automation,dependencies"
68+
assignees: "github-copilot[bot]"
6869
token: ${{ secrets.GITHUB_TOKEN }}
69-
add-paths: |
70-
gulpfile.mjs
70+
repository: ${{ github.repository }}

0 commit comments

Comments
 (0)