|
12 | 12 | jobs: |
13 | 13 | check-and-update-cli-version: |
14 | 14 | runs-on: ubuntu-latest |
| 15 | + permissions: |
| 16 | + contents: write |
| 17 | + pull-requests: write |
| 18 | + |
15 | 19 | steps: |
16 | 20 | - name: Checkout repository |
17 | 21 | uses: actions/checkout@v4 |
@@ -42,25 +46,25 @@ jobs: |
42 | 46 | echo "update_needed=false" >> $GITHUB_OUTPUT |
43 | 47 | fi |
44 | 48 |
|
45 | | - - name: Generate issue content file |
| 49 | + - name: Update gulpfile.mjs with new CLI version |
46 | 50 | if: steps.compare_versions.outputs.update_needed == 'true' |
47 | 51 | run: | |
48 | | - echo "A new version of Microsoft.PowerApps.CLI is available on NuGet." > .github/cli-update-issue-template.md |
49 | | - echo "" >> .github/cli-update-issue-template.md |
50 | | - echo "Current version in gulpfile.mjs: ${{ steps.get_current_version.outputs.current_version }}" >> .github/cli-update-issue-template.md |
51 | | - echo "Latest version on NuGet: ${{ steps.get_latest_version.outputs.latest_version }}" >> .github/cli-update-issue-template.md |
52 | | - echo "" >> .github/cli-update-issue-template.md |
53 | | - echo "Please update the CLI version in the repository." >> .github/cli-update-issue-template.md |
54 | | - echo "" >> .github/cli-update-issue-template.md |
55 | | - echo "For implementation reference, see PR #1236." >> .github/cli-update-issue-template.md |
| 52 | + sed -i "s/const cliVersion = '[0-9.]*'/const cliVersion = '${{ steps.get_latest_version.outputs.latest_version }}'/" gulpfile.mjs |
56 | 53 |
|
57 | | - - name: Create GitHub issue to update CLI version and assign to Copilot |
| 54 | + - name: Create Pull Request to update CLI version |
58 | 55 | if: steps.compare_versions.outputs.update_needed == 'true' |
59 | | - uses: peter-evans/create-issue-from-file@v5 |
| 56 | + uses: peter-evans/create-pull-request@v6 |
60 | 57 | with: |
61 | | - title: "Update PowerApps CLI version to ${{ steps.get_latest_version.outputs.latest_version }}" |
62 | | - content-filepath: .github/cli-update-issue-template.md |
63 | | - labels: "automation,dependencies" |
64 | | - assignees: "github-copilot[bot]" |
65 | | - env: |
66 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 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 |
| 68 | + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
| 69 | + add-paths: | |
| 70 | + gulpfile.mjs |
0 commit comments