Skip to content

Commit

Permalink
Include a ZIP workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bordoni committed Apr 27, 2024
1 parent 4e3911b commit 8a32f3f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Generate Zip

on:
workflow_dispatch:
inputs:
ref:
description: 'Git Commit Ref (branch, tag, or hash)'
default: 'main'
required: true
type: string
production:
description: 'Is this a production build?'
default: false
type: boolean

jobs:
generate-zip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: install pup
run: composer -- pup

- name: pup build
run: composer -- pup build

- name: pup check
run: composer -- pup check

- name: pup i18n
run: composer -- pup i18n

- name: get version
if: ${{ inputs.production }}
run: echo "VERSION=$(composer -- pup get-version)" >> $GITHUB_ENV

- name: get dev version
if: ${{ !inputs.production }}
run: echo "VERSION=$(composer -- pup get-version --dev)" >> $GITHUB_ENV

- name: get zip name
run: echo "ZIP_NAME=$(composer -- pup zip-name ${{ env.VERSION }})" >> $GITHUB_ENV

- name: pup package
run: composer -- pup package ${{ env.VERSION }}

- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ZIP_NAME }}
path: .pup-zip

0 comments on commit 8a32f3f

Please sign in to comment.