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