Add a GitHub action to manually trigger the generation of a release zip file

This commit is contained in:
Nestor Soriano 2021-04-16 13:06:49 +02:00
parent 87a6ebf03f
commit b09ddd7984
No known key found for this signature in database
GPG Key ID: 08110F3518C12CAD
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
name: Build release zip file
on:
workflow_dispatch:
inputs:
ref:
description: 'By default the zip file is generated from the branch the workflow runs from, but you can specify an explicit reference to use instead here (e.g. refs/tags/tag_name). The resulting file will be available as an artifact on the workflow run.'
required: false
default: ''
jobs:
build:
name: Build release zip file
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref || github.ref }}
- name: Build the zip file
id: build
uses: woocommerce/action-build@v2
- name: Unzip the file (prevents double zip problem)
run: unzip ${{ steps.build.outputs.zip_path }} -d zipfile
- name: Upload the zip file as an artifact
uses: actions/upload-artifact@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: woocommerce
path: zipfile
retention-days: 7