diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..fce1c26 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9ce8b37 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.3" + + - name: Install Dependencies + run: composer install --no-progress --no-suggest --prefer-dist + + - name: Create Release Pull Request or Publish to Packagist + id: changesets + uses: changesets/action@v1 + with: + commit: "chore(release): version packages" + title: "chore(release): version packages" + publish: composer run release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }} diff --git a/composer.json b/composer.json index f3fbd0c..90e8087 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,6 @@ { "name": "notrab/dumbo", "description": "A lightweight, friendly PHP framework for HTTP.", - "version": "1.0.0", "type": "library", "license": "MIT", "homepage": "https://github.com/notrab/dumbo", @@ -45,7 +44,10 @@ } }, "scripts": { - "test": "vendor/bin/phpunit tests" + "test": "vendor/bin/phpunit tests", + "changeset": "changeset", + "version": "changeset version", + "release": "changeset publish" }, "minimum-stability": "stable", "prefer-stable": true diff --git a/composer.lock b/composer.lock index 4f7c331..a4f482e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "62291e67f29621f81dd70f5566013a6c", + "content-hash": "250c70a03e252cc9424a81a7b3bbaa8c", "packages": [ { "name": "firebase/php-jwt", @@ -2129,7 +2129,7 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false,