From f1e2471baa793fbd1fccf8e3898e100e5f4416c1 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Fri, 6 Dec 2024 23:55:13 +0700 Subject: [PATCH] trigger positive build --- .github/workflows/sync-pr.yml | 45 ++++++++++++++----- .../PHP/8/4/8.4.1/PHP.PHP.8.4.installer.yaml | 32 ------------- .../8/4/8.4.1/PHP.PHP.8.4.locale.en-US.yaml | 25 ----------- .../p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.yaml | 8 ---- templates/winget-pr-template.md | 12 +++-- 5 files changed, 43 insertions(+), 79 deletions(-) delete mode 100644 manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.installer.yaml delete mode 100644 manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.locale.en-US.yaml delete mode 100644 manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.yaml diff --git a/.github/workflows/sync-pr.yml b/.github/workflows/sync-pr.yml index 0bc9f9d..9564194 100644 --- a/.github/workflows/sync-pr.yml +++ b/.github/workflows/sync-pr.yml @@ -1,6 +1,10 @@ name: Sync and PR + permissions: contents: write + id-token: write + attestations: write + on: workflow_dispatch: workflow_call: @@ -44,7 +48,12 @@ jobs: else echo "new_version=none" >> $GITHUB_OUTPUT fi - + + - name: Add job summary when new releases are found + if: contains('none', steps.version_update.outputs.new_version) == true + run: | + run: echo 'No new releases found.' >> $GITHUB_STEP_SUMMARY + - name: Clone PHPWatch/winget-pkgs uses: actions/checkout@v4 if: contains('none', steps.version_update.outputs.new_version) == false @@ -71,6 +80,11 @@ jobs: if: contains('none', steps.version_update.outputs.new_version) == false run: find winget-pkgs/manifests/p/PHP/PHP | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/" + - uses: actions/attest-build-provenance@v2 + id: attest + with: + subject-path: builder/manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }} + - name: Generate commit message id: commit_msg if: contains('none', steps.version_update.outputs.new_version) == false @@ -79,11 +93,15 @@ jobs: echo "commit_msg<<$EOF" >> $GITHUB_OUTPUT cat builder/winget-commit-message.md >> $GITHUB_OUTPUT echo "$EOF" >> $GITHUB_OUTPUT - echo "--New Version--" - echo ${{ steps.version_update.outputs.new_version }} - echo "${{ steps.version_update.outputs.new_version }}" | wc -c - echo "-${{ steps.version_update.outputs.new_version }}-" | wc -c - echo "-${{ steps.version_update.outputs.new_version }}-" + + echo "## New Version" >> $GITHUB_STEP_SUMMARY + echo "${{ steps.version_update.outputs.new_version }}" >> $GITHUB_STEP_SUMMARY + + echo "## Commit message" >> $GITHUB_STEP_SUMMARY + cat builder/winget-commit-message.md >> $GITHUB_STEP_SUMMARY + + echo "## PR Content" >> $GITHUB_STEP_SUMMARY + cat builder/winget-pr-template.md >> $GITHUB_STEP_SUMMARY - name: Remove old files from winget-pkgs if: contains('none', steps.version_update.outputs.new_version) == false @@ -91,7 +109,7 @@ jobs: rm -r winget-pkgs/manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }} cp -r builder/manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }} winget-pkgs/manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }} - - name: Commit data + - name: Commit data to own repo uses: stefanzweifel/git-auto-commit-action@v5 if: contains('none', steps.version_update.outputs.new_version) == false with: @@ -99,9 +117,10 @@ jobs: branch: main add_options: '-A' repository: builder - tagging_message: ${{ steps.commit_msg.outputs.commit_msg }} + tagging_message: ${{ steps.version_update.outputs.new_version }} - name: Create Pull Request + id: create_pr uses: peter-evans/create-pull-request@v7 if: contains('none', steps.version_update.outputs.new_version) == false with: @@ -110,7 +129,13 @@ jobs: body-path: builder/winget-pr-template.md add-paths: "manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }}" commit-message: ${{ steps.commit_msg.outputs.commit_msg }} - title: "[PHP] Add new version ${{ matrix.php-version-major }}.${{ matrix.php-version-minor }}" + title: "[PHP] Add new version `PHP.PHP.${{ matrix.php-version-major }}.${{ matrix.php-version-minor }}` - `${{ steps.version_update.outputs.new_version }}`" committer: "Ayesh Karunaratne " author: "Ayesh Karunaratne " - branch: "php-version-${{ matrix.php-version-major }}-${{ matrix.php-version-minor }}" + branch: "php-v-${{ steps.version_update.outputs.new_version }}" + + - name: Add Pull request information + if: ${{ steps.create_pr.outputs.pull-request-ur }} + run: | + echo "## PR ${{ steps.create_pr.outputs.pull-request-operation }}" >> $GITHUB_STEP_SUMMARY + echo "${{ steps.create_pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY diff --git a/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.installer.yaml b/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.installer.yaml deleted file mode 100644 index 3b0c142..0000000 --- a/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.installer.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Created with PHPWatch/winget-pkgs - https://github.com/PHPWatch/php-winget-manifest -# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.9.0.schema.json - -PackageIdentifier: PHP.PHP.8.4 -PackageVersion: 8.4.1 -InstallerLocale: en-US -InstallerType: zip -NestedInstallerType: portable -NestedInstallerFiles: - - RelativeFilePath: php.exe - PortableCommandAlias: php -Commands: - - php - - php84 -UpgradeBehavior: install -ReleaseDate: 2024-11-20 -ArchiveBinariesDependOnPath: true -Installers: - - Architecture: x64 - InstallerUrl: https://windows.php.net/downloads/releases/php-8.4.1-Win32-vs17-x64.zip - InstallerSha256: 020d265aa9aa2759dcd527c16ce4749cb7b8b7f70ec13cac9237f428da2eb6ee - Dependencies: - PackageDependencies: - - PackageIdentifier: Microsoft.VCRedist.2015+.x64 - - Architecture: x86 - InstallerUrl: https://windows.php.net/downloads/releases/php-8.4.1-Win32-vs17-x86.zip - InstallerSha256: f9555e4c85cd66cb6761404dac270f4bcd87947b10a727fc1d4bb99a03bb1060 - Dependencies: - PackageDependencies: - - PackageIdentifier: Microsoft.VCRedist.2015+.x86 -ManifestType: installer -ManifestVersion: 1.9.0 diff --git a/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.locale.en-US.yaml b/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.locale.en-US.yaml deleted file mode 100644 index 3aa48bc..0000000 --- a/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.locale.en-US.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Created with PHPWatch/winget-pkgs - https://github.com/PHPWatch/php-winget-manifest -# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.9.0.schema.json - -PackageIdentifier: PHP.PHP.8.4 -Description: "PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML." -ShortDescription: PHP 8.4 -PackageVersion: 8.4.1 -ReleaseNotesUrl: https://www.php.net/ChangeLog-8.php#8.4.1 -PackageLocale: en-US -Publisher: PHP Group -PublisherUrl: https://php.net -PublisherSupportUrl: https://www.php.net/docs.php -Author: PHP Group -PackageName: PHP 8.4 -PackageUrl: https://php.net -License: PHP License v3.01 -LicenseUrl: http://www.php.net/license/3_01.txt -Copyright: (c) PHP Group -CopyrightUrl: https://www.php.net/credits.php -Moniker: php8.4 -Tags: - - php - - php84 -ManifestType: defaultLocale -ManifestVersion: 1.9.0 diff --git a/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.yaml b/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.yaml deleted file mode 100644 index d528957..0000000 --- a/manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# Created with PHPWatch/winget-pkgs - https://github.com/PHPWatch/php-winget-manifest -# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.9.0.schema.json - -PackageIdentifier: PHP.PHP.8.4 -PackageVersion: 8.4.1 -DefaultLocale: en-US -ManifestType: version -ManifestVersion: 1.9.0 diff --git a/templates/winget-pr-template.md b/templates/winget-pr-template.md index 5fbffe6..807bb07 100644 --- a/templates/winget-pr-template.md +++ b/templates/winget-pr-template.md @@ -1,10 +1,14 @@ Updates `PHP.PHP.%versionmajor%.%versionminor%` to PHP `%fullversion%` +--- + **PHP %fullversion%** -Download x86: %url-x86% -Checksum x86: %hash-x86% -Download x64: %url-x64% -Checksum x64: %hash-x64% +x86 zip Download: %url-x86% +x86 zip checksum: %hash-x86% +x64 zip Download: %url-x64% +x64 zip Checksum: %hash-x64% + +--- Checklist for Pull Requests - [x] Have you signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs)?