From d2cf170cadc50ef4a879a6f34118ef01ccc5a87f Mon Sep 17 00:00:00 2001 From: Thibaut Selingue Date: Fri, 26 Apr 2024 12:15:20 +0200 Subject: [PATCH] chore(actions): add release please workflow --- .github/workflows/release-please.yml | 38 ++++++++++++++++++++++++++++ release-please-config.json | 13 ++++++++++ release-please-manifest.json | 3 +++ 3 files changed, 54 insertions(+) create mode 100644 .github/workflows/release-please.yml create mode 100644 release-please-config.json create mode 100644 release-please-manifest.json diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..b4b31c2 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,38 @@ +name: Release + +on: + push: + branches: + - "master" + +env: + PHP_EXTENSIONS: "zip" + PHP_VERSION: "8.3" + +jobs: + release: + runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + + if: github.ref == 'refs/heads/master' + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ env.PHP_VERSION }}" + extensions: "${{ env.PHP_EXTENSIONS }}" + tools: humbug/box + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - uses: google-github-actions/release-please-action@v4 + id: create_release + with: + target-branch: master diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..6c048d2 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "php", + "include-component-in-tag": false, + "packages": { + ".": { + "changelog-path": "CHANGELOG.md", + "draft": true, + "package-name": "release-please-action", + "release-type": "php" + } + } +} diff --git a/release-please-manifest.json b/release-please-manifest.json new file mode 100644 index 0000000..ba67087 --- /dev/null +++ b/release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "2.1.0" +}