Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Attach ZIP to GitHub Release Workflow #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.* export-ignore
/test export-ignore
/phpunit.xml export-ignore
/README.md export-ignore
10 changes: 6 additions & 4 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
Loading