Skip to content

Commit adc20e6

Browse files
authored
Feature/GitHub flows and files (#44)
* Added some default text to bug and feature issues. * Updated gitignore to avoid github folder. * Fixed old repo ownership in the url links. * Added child files to gitignore and cleaned it up. * Added simple release workflow for PR merged. * Added pull request template file. * Added simple php linter to check errors. * Rename .github files to lowercase for modern standardization.
1 parent 627e696 commit adc20e6

11 files changed

Lines changed: 101 additions & 14 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Bug Report
3+
about: Report something that's broken
4+
labels: Bug
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**How to reproduce**
11+
Steps to cause the bug or a link to a minimal reproduction.
12+
13+
**Environment**
14+
PHP version, OS, and Server (Apache/NGINX/CLI).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
labels: Enhancement
5+
---
6+
7+
**The Idea**
8+
What is the problem or new feature you are suggesting?
9+
10+
**How it should work**
11+
A clear description of how you imagine this feature working in Arcane.

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Please ensure this Pull Request is targeting the `develop` branch, not `master`.
2+
3+
---
4+
5+
**What does this PR do?**
6+
A brief description of the changes, bug fixes, or new features.
7+
8+
**Why is this needed?**
9+
Link to any relevant issues or explain the reasoning behind the change.

.github/workflows/linter.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Linter PHP
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
9+
jobs:
10+
linter:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.4'
20+
21+
- name: Check PHP Syntax
22+
run: php -l index.php

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Auto Release
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
types:
8+
- closed
9+
10+
jobs:
11+
release:
12+
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'develop'
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v4
19+
20+
- name: Extract Version
21+
id: get_version
22+
run: |
23+
VERSION=$(grep -oE 'Arcane [0-9]+\.[0-9]+\.[0-9]+' index.php | awk '{print $2}')
24+
if [ -z "$VERSION" ]; then
25+
echo "Error: Version could not be extracted from index.php."
26+
exit 1
27+
fi
28+
echo "version=$VERSION" >> $GITHUB_OUTPUT
29+
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
30+
31+
- name: Create Release
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: |
35+
gh release create ${{ steps.get_version.outputs.tag }} \
36+
--title "${{ steps.get_version.outputs.version }}" \
37+
--generate-notes \
38+
--target ${{ github.event.pull_request.base.ref }} \
39+
index.php

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*
2+
!.github/
3+
!.github/**
24
!.gitignore
3-
!composer.json
45
!LICENSE.md
56
!README.md
6-
!index.php
7+
!composer.json
8+
!index.php

0 commit comments

Comments
 (0)