Skip to content

Nightly

Nightly #902

Workflow file for this run

name: Nightly
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
env:
COMPOSER_NO_INTERACTION: 1
jobs:
phplint:
uses: pronamic/actions/.github/workflows/phplint.yml@main
phpcs:
uses: pronamic/actions/.github/workflows/phpcs.yml@main
phpstan:
uses: pronamic/actions/.github/workflows/phpstan.yml@main
psalm:
uses: pronamic/actions/.github/workflows/psalm.yml@main
phpunit:
uses: pronamic/actions/.github/workflows/phpunit.yml@main
build:
name: Build
runs-on: ubuntu-latest
needs: [phplint, phpcs, phpstan]
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: bcmath, intl, mbstring, mysql
ini-values: memory_limit=2048M
tools: composer
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Switch to packages development
run: php src/dev.php main
- name: Install WP-CLI packages
run: composer exec wp package install wp-cli/dist-archive-command
- name: Build Pronamic Pay
run: composer build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: pronamic-pay-nightly
path: build/project/**/*
- name: Copy build asset
run: cp build/pronamic-ideal.*.zip build/pronamic-ideal.zip
- name: Deploy nightly build
uses: WebFreak001/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/pronamic/wp-pronamic-pay/releases/67360977/assets{?name,label}
release_id: 67360977
asset_path: build/pronamic-ideal.zip
asset_name: pronamic-pay-nightly.zip
asset_content_type: application/zip
max_releases: 1
update:
name: Update nightly tag
runs-on: ubuntu-latest
steps:
- name: Update nightly tag
uses: richardsimko/[email protected]
with:
tag_name: nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}