Skip to content

Commit

Permalink
New: Support Slack-bot-based zip packaging requests (#6807)
Browse files Browse the repository at this point in the history
This tweaks the `generate-zip.yml` workflow so that it passes along some extra values to the `givewp-github-actions` zip workflow that enable versioned builds and Slack communication.

To support the versioned builds, a tweak to package.json is necessary so that we can read/write version number data in plugin files.
  • Loading branch information
borkweb authored May 26, 2023
1 parent 93728f3 commit b7ec45e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/generate-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,29 @@ on:
description: 'Git Commit Ref (branch, tag, or hash)'
required: true
type: string
production:
description: 'Is this a production build?'
default: false
type: boolean
slack_channel:
description: 'Slack channel ID to post to'
default: ''
required: false
type: string
slack_thread:
description: 'Slack thread to post to'
default: ''
required: false
type: string


jobs:
build:
uses: impress-org/givewp-github-actions/.github/workflows/generate-zip.yml@master
with:
ref: ${{ github.event.inputs.ref }}
plugin_slug: give
production: ${{ github.event.inputs.production }}
slack_channel: ${{ github.event.inputs.slack_channel }}
slack_thread: ${{ github.event.inputs.slack_thread }}
secrets: inherit
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"url": "https://github.com/impress-org/give/issues"
},
"homepage": "https://github.com/impress-org/give#readme",
"_zipname": "give",
"_version_files": [
{
"file": "give.php",
"regex": "(define\\('GIVE_VERSION', ')([^']+)"
},
{
"file": "give.php",
"regex": "(Version: )([^\\s]+)"
}
],
"devDependencies": {
"@babel/core": "^7.13.10",
"@babel/eslint-parser": "^7.13.10",
Expand Down

0 comments on commit b7ec45e

Please sign in to comment.