woocommerce/.github/workflows/nightly-builds.yml

57 lines
1.5 KiB
YAML
Raw Normal View History

2020-04-28 02:32:19 +00:00
name: Nightly builds
on:
schedule:
- cron: '0 0 * * *' # Run at 12 AM UTC.
2022-05-17 19:29:16 +00:00
workflow_dispatch:
permissions: {}
2020-04-28 02:32:19 +00:00
jobs:
build:
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]
runs-on: ubuntu-20.04
permissions:
contents: write
2020-04-28 02:32:19 +00:00
steps:
- uses: actions/checkout@v3
2020-04-28 02:32:19 +00:00
with:
ref: ${{ matrix.build }}
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
pull-package-deps: '@woocommerce/plugin-woocommerce'
- name: Build zip
working-directory: plugins/woocommerce
run: bash bin/build-zip.sh
2020-04-28 02:32:19 +00:00
- name: Deploy nightly build
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
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
runs-on: ubuntu-20.04
permissions:
contents: write
2020-04-28 02:32:19 +00:00
steps:
- name: Update nightly tag
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 }}