Fix error in module content #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
tags: ["*"] | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- uses: pre-commit/action@v3.0.0 | |
- uses: pre-commit-ci/lite-action@v1.0.1 | |
if: always() | |
php-linter: | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- "5.6" | |
- "7.2" | |
- "7.3" | |
name: PHP Syntax check ${{ matrix.php-version }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: PHP syntax check | |
run: | | |
find . -type f -name "*.php" -not -path "./vendor/*" -exec php -l -n {} \; | |
php-cs-fixer: | |
name: PHP CS Fixer | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: PHP-CS-Fixer | |
uses: docker://oskarstark/php-cs-fixer-ga | |
publish: | |
name: Create archive | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "7.2" | |
- name: Install prod composer dependencies | |
run: composer install --no-dev -o | |
- name: Setup Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Create archive | |
id: zip-file | |
timeout-minutes: 1 | |
run: | | |
VERSION=${{ github.ref_name || github.sha }} | |
ARCHIVE_NAME=shootime.${VERSION}.zip | |
ls -la | |
sed -i "s/0.0.0/${VERSION}/g" config.xml shootime.php | |
rm -f vendor/symfony/config/Tests/Fixtures/ParseError.php | |
python scripts/create-archive.py ${ARCHIVE_NAME} | |
echo "archive_name=${ARCHIVE_NAME}" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: ${{ steps.zip-file.outputs.archive_name }} |