Skip to content

fix: Add fallback for variants #83

fix: Add fallback for variants

fix: Add fallback for variants #83

Workflow file for this run

name: Stable Branch Workflow
on:
push:
branches: [ "[0-9]+.x", "stable" ]
workflow_dispatch: ~
pull_request:
branches: [ "[0-9]+.x", "stable" ]
types: [ opened, synchronize, reopened ]
jobs:
test:
name: Run PHP tests
if: |
!(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]')) &&
!(github.event_name == 'pull_request' && contains(join(github.event.pull_request.title, github.event.pull_request.body), '[skip ci]'))
runs-on: ubuntu-latest
steps:
- name: Clone code repo
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.1'
tools: composer:v1
- name: Install dependencies
run: composer install
- name: Run phpunit
run: php vendor/bin/phpunit --coverage-text
- name: Run phpcs
run: php vendor/bin/phpcs --standard=PSR2 src/Makaira/
- name: Run phpmd
run: php vendor/bin/phpmd src/Makaira/ text codesize,design
release:
name: Create a new release
if: github.event_name != 'pull_request'
needs: test
runs-on: ubuntu-latest
steps:
- name: Clone code repo
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v2
with:
git_user_signingkey: true
git_commit_gpgsign: true
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Install npm dependencies
run: yarn
- name: Semantic release
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_USERNAME }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_USERNAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_EMAIL }}
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }}