From add3b562be8102d633ffc1c0c3f588ced2a22be1 Mon Sep 17 00:00:00 2001 From: Alan Poulain Date: Tue, 6 Sep 2022 17:59:53 +0200 Subject: [PATCH] ci: update release workflow --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/release.yml | 26 ++++++-------------------- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5afb1f63..47ac4d71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,13 +21,13 @@ jobs: - php: '8.1' coverage: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -44,7 +44,7 @@ jobs: - name: Install prerequisites run: | - wget -O box.phar https://github.com/humbug/box/releases/download/3.13.0/box.phar + wget -O box.phar https://github.com/humbug/box/releases/download/4.0.2/box.phar echo "BOX_BIN=$(pwd)/box.phar" >> $GITHUB_ENV sudo chown -R $(whoami):$(whoami) . @@ -76,7 +76,7 @@ jobs: run: vendor/bin/phpstan analyse --ansi - name: Run e2e tests - if: startsWith(matrix.php, '8.') + if: startsWith(matrix.php, '8.1') run: bin/compile - name: Upload coverage results to Coveralls diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5065ace0..616593ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,12 +13,12 @@ jobs: upload_url: ${{ steps.step_upload_url.outputs.upload_url }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: '8.1' extensions: json ini-values: memory_limit=-1 tools: composer @@ -27,30 +27,16 @@ jobs: run: composer install --prefer-dist --no-interaction --no-progress --ansi - name: Download box.phar - run: wget -O box.phar https://github.com/humbug/box/releases/download/3.13.0/box.phar + run: wget -O box.phar https://github.com/humbug/box/releases/download/4.0.2/box.phar - name: Compile project run: php ./box.phar compile - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + name: Release ${{ github.ref }} body: '' draft: false prerelease: false - - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./schema.phar - asset_name: schema.phar - asset_content_type: application/x-php + files: schema.phar