This repository was archived by the owner on May 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (48 loc) · 1.89 KB
/
release.yml
File metadata and controls
62 lines (48 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Prepare & Deploy a Release
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
WC_DEVELOP_REPO: git@github.com:woocommerce/woocommerce.git
WC_PHPUNIT_REPO: git@github.com:ndigitals/wc-phpunit.git
PHP_VERSION: '7.4'
COMPOSER_VERSION: '2.2'
ACTION_VERSION: 1
jobs:
release:
name: New Release
if: github.repository == 'ndigitals/wc-phpunit-build'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v2
- name: Get Composer Cache Directory
id: composer-cache
if: ${{ !env.ACT }}
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer dependencies
if: ${{ !env.ACT }}
# https://github.com/marketplace/actions/cache
uses: actions/cache@v2
env:
composer-cache-name: cache-composer
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.composer-cache-name }}-${{ env.COMPOSER_VERSION }}-php-${{ env.PHP_VERSION }}-v${{ env.ACTION_VERSION }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.composer-cache-name }}-wp-${{ matrix.wordpress-version }}-wc-${{ matrix.woocommerce-version }}-v${{ env.ACTION_VERSION }}-
- name: Setup PHP & Composer Environment
# https://github.com/marketplace/actions/setup-php-action
uses: shivammathur/setup-php@v2
with:
php-version: "${{ env.PHP_VERSION }}"
tools: "composer:${{ env.COMPOSER_VERSION }}"
- name: Environment Check
run: php -v && composer --version
- name: Install Composer Dependencies
run: composer install --no-dev --prefer-dist
- name: Build WC PHPUnit Release
run: bin/build
- name: Deploy WC PHPUnit Release
run: bin/deploy