Skip to content

Commit a06e992

Browse files
Added some files for GitHub
1 parent 38544e6 commit a06e992

File tree

10 files changed

+442
-0
lines changed

10 files changed

+442
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Bug
2+
description: Report a bug or other issue
3+
4+
labels: 'needs review'
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report!
11+
12+
⚠️Review existing issues to see whether someone else has already reported your issue.
13+
14+
- type: textarea
15+
id: environment
16+
attributes:
17+
label: Environment
18+
description: |
19+
Tip: Use the `composer global info dragon-code/iconify-ide` command to get information for Laravel Lang.
20+
Tip: Use the `php -v` command to get information for PHP.
21+
value: |
22+
- Code Styler Version:
23+
- PHP Version:
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: description
29+
attributes:
30+
label: Issue description
31+
description: |
32+
Be as specific and detailed as possible to help us triaging your issue. Screenshots and/or animations can be very useful in helping to understand the issue you're facing.
33+
34+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
35+
Tip: You can use https://www.screentogif.com to record animations and videos.
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: steps
41+
attributes:
42+
label: Steps to reproduce
43+
description: Take some time to try and reproduce the issue, then explain how to do so here.
44+
validations:
45+
required: true
46+
47+
- type: markdown
48+
attributes:
49+
value: |
50+
❤️ The Dragon Code? Please consider supporting [our collective](https://boosty.to/dragon-code)

.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: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Feature Proposal
2+
description: Propose a new feature
3+
4+
labels:
5+
- 'feature request'
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report!
12+
13+
⚠️Review existing issues to see whether someone else has already reported your issue.
14+
15+
- type: textarea
16+
id: description
17+
attributes:
18+
label: Feature description
19+
description: |
20+
Think through your proposal and describe it clearly.
21+
22+
Note that features are only added to the most recent version of Laravel Lang.
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: environment
28+
attributes:
29+
label: Environment
30+
description: |
31+
Tip: Use the `composer global info dragon-code/iconify-ide` command to get information for Laravel Lang.
32+
Tip: Use the `php -v` command to get information for PHP.
33+
value: |
34+
- Code Styler Version:
35+
- PHP Version:
36+
validations:
37+
required: true
38+
39+
- type: markdown
40+
attributes:
41+
value: |
42+
❤️ The Dragon Code? Please consider supporting [our collective](https://boosty.to/dragon-code).

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
labels:
8+
- dependabot

.github/workflows/build.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: Build application
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag version'
8+
required: true
9+
10+
permissions: write-all
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Extract the tag version
18+
id: tag
19+
run: |
20+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
21+
GITHUB_REF=${{ github.event.inputs.tag }}
22+
fi
23+
echo "tag=${GITHUB_REF##*v}" >> "$GITHUB_OUTPUT"
24+
25+
- name: Checkout the code
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: true
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: 8.2
34+
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json, dom, curl, libxml, fileinfo, tokenizer, xml
35+
ini-values: error_reporting=E_ALL
36+
coverage: none
37+
38+
- name: Install the dependencies
39+
run: composer install --prefer-dist --no-progress --no-interaction --no-suggest
40+
41+
- name: Execute unit/feature tests
42+
run: php ./iconify --test
43+
44+
- name: Create the PHAR file
45+
run: php ./iconify app:build iconify --build-version=${{ steps.tag.outputs.tag }} --ansi
46+
47+
- name: Upload artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: iconify
51+
path: builds/iconify
52+
retention-days: 1
53+
54+
checks:
55+
runs-on: ubuntu-latest
56+
57+
needs: build
58+
59+
strategy:
60+
fail-fast: true
61+
matrix:
62+
os: [ "ubuntu-latest", "windows-latest" ]
63+
php: [ "8.2", "8.3", "8.4" ]
64+
65+
name: check on ${{ matrix.os }} with PHP ${{ matrix.php }}
66+
67+
steps:
68+
- name: Setup PHP
69+
uses: shivammathur/setup-php@v2
70+
with:
71+
php-version: ${{ matrix.php }}
72+
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json, dom, curl, libxml, fileinfo, tokenizer, xml
73+
ini-values: error_reporting=E_ALL
74+
coverage: none
75+
76+
- name: Remove old file
77+
run: rm -f builds/iconify
78+
79+
- uses: actions/download-artifact@v4
80+
with:
81+
name: iconify
82+
path: builds
83+
84+
- name: Show version
85+
run: php builds/iconify --version
86+
87+
- name: Run iconify-ide
88+
run: php builds/iconify --test
89+
90+
push:
91+
runs-on: ubuntu-latest
92+
93+
needs: checks
94+
95+
steps:
96+
- name: Checkout the code
97+
uses: actions/checkout@v4
98+
99+
- name: Remove old file
100+
run: rm -f builds/iconify
101+
102+
- uses: actions/download-artifact@v4
103+
with:
104+
name: iconify
105+
path: builds
106+
107+
- name: Git setup
108+
run: |
109+
git config --local user.email "[email protected]"
110+
git config --local user.name "GitHub Action"
111+
112+
git config --global core.autocrlf false
113+
git config --global core.eol lf
114+
115+
- name: Commit the PHAR file
116+
id: build
117+
run: |
118+
IS_DIRTY=1
119+
120+
{ git add ./builds/iconify && git commit -a -m "🏗️ Build application"; } || IS_DIRTY=0
121+
122+
echo "is_dirty=${IS_DIRTY}" >> "$GITHUB_OUTPUT"
123+
124+
- name: Push changes
125+
uses: ad-m/github-push-action@master
126+
if: steps.build.outputs.is_dirty == 1
127+
with:
128+
github_token: ${{ secrets.COMPOSER_TOKEN }}

.github/workflows/code-style.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Code Style
2+
3+
on: [ push, pull_request ]
4+
5+
permissions: write-all
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
11+
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/main' }}
12+
13+
name: Check
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
23+
coverage: none
24+
25+
- name: Install dependency
26+
run: composer global require dragon-code/iconify-ide
27+
28+
- name: Check the code-style
29+
run: codestyle --test
30+
31+
fix:
32+
runs-on: ubuntu-latest
33+
34+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
35+
36+
name: Fix
37+
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v4
41+
42+
- name: Setup PHP
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
46+
coverage: none
47+
48+
- name: Setup Composer
49+
run: |
50+
composer global config --no-plugins allow-plugins.dragon-code/iconify-ide true
51+
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
52+
53+
composer config --no-plugins allow-plugins.dragon-code/iconify-ide true
54+
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
55+
56+
- name: Install dependencies
57+
run: |
58+
composer global require dragon-code/iconify-ide
59+
composer global require ergebnis/composer-normalize
60+
61+
- name: Fix the code-style
62+
run: |
63+
codestyle dependabot
64+
codestyle
65+
66+
composer normalize
67+
68+
- name: Create a Pull Request
69+
uses: peter-evans/create-pull-request@v7
70+
with:
71+
branch: code-style
72+
branch-suffix: random
73+
delete-branch: true
74+
title: "🦋 The code style has been fixed"
75+
commit-message: 🦋 The code style has been fixed
76+
body: The code style has been fixed
77+
labels: code-style

.github/workflows/license.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Update license
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 1 1 *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
Update:
10+
uses: TheDragonCode/.github/.github/workflows/license.yml@main

.github/workflows/publish-phar.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Publish the released PHAR
2+
3+
on:
4+
release:
5+
types: [ created ]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'Tag release version'
10+
required: true
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
16+
name: Release PHAR
17+
18+
steps:
19+
- name: Extract the tag version
20+
id: tag
21+
run: |
22+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
23+
GITHUB_REF=${{ github.event.inputs.tag }}
24+
fi
25+
echo "tag=${GITHUB_REF##*v}" >> "$GITHUB_OUTPUT"
26+
27+
- name: Checkout the code
28+
uses: actions/checkout@v4
29+
with:
30+
submodules: true
31+
ref: v${{ steps.tag.outputs.tag }}
32+
33+
- name: Setup PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json, dom, curl, libxml, fileinfo, tokenizer, xml
37+
ini-values: error_reporting=E_ALL
38+
coverage: none
39+
40+
- name: Git setup
41+
run: |
42+
git config --local user.email "[email protected]"
43+
git config --local user.name "GitHub Action"
44+
45+
git config --global core.autocrlf false
46+
git config --global core.eol lf
47+
48+
- name: Install the dependencies
49+
run: composer install --prefer-dist --no-progress --no-interaction --no-suggest
50+
51+
- name: Create the PHAR file
52+
id: build
53+
run: |
54+
IS_DIRTY=1
55+
56+
sudo php ./codestyle app:build codestyle.phar --build-version=${{ steps.tag.outputs.tag }}
57+
58+
- name: Upload the PHAR artifact
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: codestyle.phar
62+
path: builds/codestyle.phar
63+
64+
- name: Upload the PHAR to release
65+
run: gh release upload v${{ steps.tag.outputs.tag }} builds/codestyle.phar
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)