2020-04-28 02:32:19 +00:00
|
|
|
name: Nightly builds
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *' # Run at 12 AM UTC.
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-03-16 00:44:01 +00:00
|
|
|
if: github.repository_owner == 'woocommerce'
|
2020-04-28 02:32:19 +00:00
|
|
|
name: Nightly builds
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-02-25 23:51:14 +00:00
|
|
|
build: [trunk]
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-04-28 02:32:19 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2022-04-21 18:29:53 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-04-28 02:32:19 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ matrix.build }}
|
2022-04-27 13:40:37 +00:00
|
|
|
|
2022-05-02 23:48:20 +00:00
|
|
|
- name: Get cached composer and pnpm directories
|
|
|
|
uses: actions/cache@v3
|
|
|
|
id: cache-deps
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.pnpm-store
|
|
|
|
plugins/woocommerce/packages
|
|
|
|
plugins/woocommerce/**/vendor
|
2022-05-04 22:20:31 +00:00
|
|
|
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
|
2022-05-02 23:48:20 +00:00
|
|
|
|
2022-04-27 13:40:37 +00:00
|
|
|
- name: Install PNPM
|
2022-05-02 17:08:52 +00:00
|
|
|
run: npm install -g pnpm@^6.24.2
|
2022-04-27 13:40:37 +00:00
|
|
|
|
2022-05-02 23:48:20 +00:00
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: '7.4'
|
|
|
|
|
2022-04-27 13:40:37 +00:00
|
|
|
- name: Build zip
|
2022-05-02 23:48:20 +00:00
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: bash bin/build-zip.sh
|
2022-04-27 13:40:37 +00:00
|
|
|
|
2020-04-28 02:32:19 +00:00
|
|
|
- name: Deploy nightly build
|
2020-10-20 14:13:41 +00:00
|
|
|
uses: WebFreak001/deploy-nightly@v1.1.0
|
2020-04-28 02:32:19 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/25945111/assets{?name,label}
|
|
|
|
release_id: 25945111
|
2022-04-27 13:40:37 +00:00
|
|
|
asset_path: plugins/woocommerce/woocommerce.zip
|
2020-04-28 14:51:10 +00:00
|
|
|
asset_name: woocommerce-${{ matrix.build }}-nightly.zip
|
2020-04-28 02:32:19 +00:00
|
|
|
asset_content_type: application/zip
|
|
|
|
max_releases: 1
|
|
|
|
update:
|
|
|
|
name: Update nightly tag commit ref
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-04-28 02:32:19 +00:00
|
|
|
steps:
|
|
|
|
- name: Update nightly tag
|
2020-11-06 10:34:18 +00:00
|
|
|
uses: richardsimko/github-tag-action@v1.0.5
|
2020-04-28 02:32:19 +00:00
|
|
|
with:
|
|
|
|
tag_name: nightly
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|