Skip to content

Commit 70da18e

Browse files
committed
Adding github workflows and issue templates
1 parent 96704d6 commit 70da18e

File tree

11 files changed

+216
-8
lines changed

11 files changed

+216
-8
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug
3+
about: Broken functionality should be fixed
4+
title: "[Broken functionality] should..."
5+
labels: bug, triage needed
6+
assignees: ""
7+
---
8+
9+
## Bug Report
10+
11+
### Description
12+
<!-- A clear and concise description of what the bug is. -->
13+
14+
### Steps to Reproduce
15+
1.
16+
2.
17+
3.
18+
19+
### Expected Behavior
20+
<!-- A clear and concise description of what you expected to happen. -->
21+
22+
### Actual Behavior
23+
<!-- A clear and concise description of what actually happened. -->
24+
25+
### Possible Solution
26+
<!-- Not obligatory, but suggest a fix/reason for the bug. -->

.github/ISSUE_TEMPLATE/chore.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Chore
3+
about: Supporting the project or maintaining the quality of the codebase
4+
title: "[New development tool] should..."
5+
labels: triage needed
6+
assignees: ""
7+
---
8+
9+
## Chore
10+
11+
### Description
12+
<!-- A clear and concise description of what the chore is. -->
13+
14+
### Context
15+
<!-- Why this chore is necessary or what it is meant to improve. -->
16+
17+
### Possible Implementation
18+
<!-- Not obligatory, but suggest an idea for implementing the chore. -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Enhancement
3+
about: Update to existing feature request
4+
title: "[Update existing functionality] should..."
5+
labels: enhancement, triage needed
6+
assignees: ""
7+
---
8+
9+
## Enhancement
10+
11+
### Description
12+
<!-- A clear and concise description of what the enhancement is. -->
13+
14+
### Context
15+
<!-- Why this enhancement is necessary or what it is meant to improve. -->
16+
17+
### Possible Implementation
18+
<!-- Not obligatory, but suggest an idea for implementing the enhancement. -->
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Integration
3+
about: New integration request
4+
title: "[New integration] should..."
5+
labels: triage needed
6+
assignees: ""
7+
---
8+
9+
## Integration
10+
11+
### Description
12+
<!-- A clear and concise description of what the integration is. -->
13+
14+
### Context
15+
<!-- Why this integration is necessary or what it is meant to improve. -->
16+
17+
### Possible Implementation
18+
<!-- Not obligatory, but suggest an idea for implementing the integration. -->
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: New Feature
3+
about: New feature request
4+
title: "[New feature] should..."
5+
labels: triage needed
6+
assignees: ""
7+
---
8+
9+
## New Feature
10+
11+
### Description
12+
<!-- A clear and concise description of what the feature is. -->
13+
14+
### Context
15+
<!-- Why this feature is necessary or what it is meant to improve. -->
16+
17+
### Possible Implementation
18+
<!-- Not obligatory, but suggest an idea for implementing the feature. -->

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Resolves #
2+
3+
## Purpose
4+
5+
<!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? -->
6+
7+
## Changes
8+
9+
<!-- Briefly describe the changes that were made. -->
10+
11+
## Visuals
12+
13+
<!-- Provide visuals if necessary. -->
14+
15+
## Testing
16+
17+
<!-- Provide the necessary steps for testing -->
18+
19+
## Related Issues
20+
21+
<!-- Link to any related issues. -->

.github/workflows/generate-zip.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Generate Plugin Zip
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description: 'Git Commit Ref (branch, tag, or hash)'
8+
required: true
9+
type: string
10+
11+
12+
jobs:
13+
build:
14+
uses: impress-org/givewp-github-actions/.github/workflows/generate-zip.yml@master
15+
with:
16+
ref: ${{ github.event.inputs.ref }}
17+
plugin_slug: wp-rollback
18+
install_composer_packages: false

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Deploy to WordPress.org
2+
3+
on:
4+
release:
5+
types: [ released ]
6+
7+
jobs:
8+
release:
9+
name: New release
10+
runs-on: ubuntu-20.04
11+
environment: live
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: 8.0
20+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
21+
coverage: none
22+
23+
- name: Install composer dependencies
24+
uses: php-actions/composer@v5
25+
with:
26+
php_version: 8.0
27+
dev: no
28+
29+
- uses: actions/setup-node@v2
30+
with:
31+
node-version: '12'
32+
33+
- name: Install npm dependencies & build for translation
34+
run: |
35+
npm install -g npm@7
36+
npm ci
37+
npm run build
38+
39+
# In order to run this WordPress also needs to be installed
40+
- name: Generate pot file
41+
run: |
42+
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
43+
chmod +x wp-cli.phar
44+
mv wp-cli.phar /usr/local/bin/wp
45+
php -d xdebug.mode=off "$(which wp)" i18n make-pot ${{github.workspace}} ${{github.workspace}}/languages/blocks-for-github.pot --exclude="$(cat .distignore | tr "\n" "," | sed 's/,$/ /' | tr " " "\n"),src/**/*.js,*.js.map"
46+
47+
- name: Build assets for production
48+
run: npm run build
49+
50+
- name: WordPress Plugin Deploy
51+
id: deploy
52+
uses: 10up/action-wordpress-plugin-deploy@stable
53+
with:
54+
generate-zip: true
55+
env:
56+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
57+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
58+
SLUG: blocks-for-github
59+
60+
- name: Upload release asset
61+
uses: actions/upload-release-asset@v1
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
with:
65+
upload_url: ${{ github.event.release.upload_url }}
66+
asset_path: ${{github.workspace}}/blocks-for-github.zip
67+
asset_name: blocks-for-github.zip
68+
asset_content_type: application/zip

block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"profileName": {
1818
"type": "string",
19-
"default": "DevinWalker"
19+
"default": "Octocat"
2020
},
2121
"repoUrl": {
2222
"type": "string",

0 commit comments

Comments
 (0)