diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..267fc0f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +/.* export-ignore +/test export-ignore +/phpunit.xml export-ignore +/README.md export-ignore \ No newline at end of file diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index bd99d22..a1dd58b 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -13,6 +13,8 @@ jobs: php: ['8.2'] # Add more PHP versions here if needed (e.g. ['8.1', '8.2']) concrete: ['latest-full'] # Add more concrete5 versions here if needed (e.g. ['9.0.0', '9.0.1', '9.0.2']) container: ghcr.io/concrete5-community/docker5:${{ matrix.concrete }} + env: + PACKAGE_HANDLE: v9_package_boilerplate # Define the package name as a variable steps: - name: Configure environment @@ -27,16 +29,16 @@ jobs: run: chown -R www-data:www-data "$GITHUB_WORKSPACE" - name: Prepare package - run: ln -s "$GITHUB_WORKSPACE" /app/packages/v9_package_boilerplate + run: ln -s "$GITHUB_WORKSPACE" /app/packages/${{ env.PACKAGE_HANDLE }} - name: Start services run: ccm-service start db web - name: Install package dependencies - run: sudo -u www-data composer --ansi --no-interaction install --optimize-autoloader --working-dir=/app/packages/v9_package_boilerplate + run: sudo -u www-data composer --ansi --no-interaction install --optimize-autoloader --working-dir=/app/packages/${{ env.PACKAGE_HANDLE }} - name: Install package - run: sudo -u www-data /app/concrete/bin/concrete5 --ansi --no-interaction c5:package:install v9_package_boilerplate + run: sudo -u www-data /app/concrete/bin/concrete5 --ansi --no-interaction c5:package:install ${{ env.PACKAGE_HANDLE }} - name: Run composer test of the package - run: sudo -u www-data composer --ansi --no-interaction test --working-dir=/app/packages/v9_package_boilerplate + run: sudo -u www-data composer --ansi --no-interaction test --working-dir=/app/packages/${{ env.PACKAGE_HANDLE }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4484910 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Attach ZIP to GitHub Release + +on: + release: + types: + - published + +jobs: + attach-zip: + name: Attach ZIP to release + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.3' + tools: composer:v2 + coverage: none + - name: Checkout + uses: actions/checkout@v3 + - name: Create and attach ZIP + uses: concrete5-community/gh-package-release-attach@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + remove-files: | + composer.json + composer.lock + keep-files: | + README.md \ No newline at end of file