diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..98d331e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +on: + push: + tags: + - 'v*' + +name: Publish release + +jobs: + publish: + name: Publish release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.2' + tools: composer + - name: Install Composer dependencies + run: composer install --no-progress --no-suggest + - name: Build project + run: ./vendor/bin/box compile + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: true + 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: ./october.phar + asset_name: october.phar + asset_content_type: application/phar