Skip to content

Commit

Permalink
chore: add github config files
Browse files Browse the repository at this point in the history
  • Loading branch information
dnwjn committed Sep 26, 2024
1 parent 80507cc commit 9b9e1ff
Show file tree
Hide file tree
Showing 9 changed files with 176 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/DISCUSSION_TEMPLATE/ideas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
body:
- type: textarea
attributes:
label: Idea
description: What is your idea?
placeholder: |
I was thinking of...
validations:
required: true
9 changes: 9 additions & 0 deletions .github/DISCUSSION_TEMPLATE/q-a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
body:
- type: textarea
attributes:
label: Question
description: What is your question?
placeholder: |
I am trying to...
validations:
required: true
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Bug Report
description: Report a reproducible bug.
body:
- type: textarea
attributes:
label: Bug description
description: What is the bug? What is the expected behavior? Feel free to add screenshots too.
placeholder: Describe the bug here.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: How can we reproduce the bug? What steps did you take?
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
render: markdown
validations:
required: true
- type: input
attributes:
label: Version
description: Which version of the package are you using?
placeholder: v1.2.3
validations:
required: true
- type: textarea
attributes:
label: Environment
description: What environment are you running in? (OS, PHP version, etc.)
placeholder: |
- OS:
- PHP version:
- ...
value: |
- OS:
- PHP version:
- ...
render: markdown
validations:
required: true
- type: textarea
attributes:
label: Logs
description: If you have any logs or error output, please paste it here.
render: shell
- type: textarea
attributes:
label: Additional details
description: Anything else we should know?
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask a Question
url: https://github.com/VanOns/vo-html-sitemap/discussions/new?category=q-a
about: Ask the community for help.
- name: Feature Request
url: https://github.com/VanOns/vo-html-sitemap/discussions/new?category=ideas
about: Share ideas for new features.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly

- package-ecosystem: npm
directory: /
schedule:
interval: weekly
30 changes: 30 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'bug'
- title: '🛠 Changes'
labels:
- 'change'
- 'dependencies'
change-template: '- $TITLE #$NUMBER (by @$AUTHOR)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## What's changed
$CHANGES
20 changes: 20 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Draft release

on:
push:
branches:
- master
- 'releases/*'

jobs:
draft-release:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/production-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: 📄 Clone Repository
uses: actions/checkout@v3
- name: 📄 Clone repository
uses: actions/checkout@v4

- name: ⚙️ Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand All @@ -30,7 +30,7 @@ jobs:
run: |
npm run build
- name: WordPress Plugin Deploy
- name: 🚀 Deploy to WordPress directory
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update changelog

on:
release:
types: [released]

jobs:
update:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

- name: Update changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
release-notes: ${{ github.event.release.body }}

- name: Commit changelog
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ github.event.release.target_commitish }}
commit_message: "chore: update CHANGELOG.md"
file_pattern: CHANGELOG.md

0 comments on commit 9b9e1ff

Please sign in to comment.