Skip to content

Commit a9d375c

Browse files
authored
feat: Package Phpactor with composer (#59)
* Use packaged phpactor in vendor and remove update option. * Update CI steps to include composer, add vsce ignore file. * Remove obsolete npm scripts
1 parent db66a74 commit a9d375c

File tree

9 files changed

+3981
-74
lines changed

9 files changed

+3981
-74
lines changed

.github/workflows/ci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ jobs:
1818
node-version: '16.14.2'
1919
- run: mkdir artifacts
2020
- run: npm ci
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: 8.2
25+
tools: composer
26+
- name: Composer Install
27+
run: composer install --prefer-dist --no-interaction --optimize-autoloader --no-dev
2128
- name: Prettier
2229
run: npm run prettier-check
2330
- name: Lint

.github/workflows/release.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@ jobs:
1515
with:
1616
node-version: 14
1717
- run: mkdir artifacts
18-
- run: npm install
19-
- run: npm build
18+
- run: npm ci
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: 8.2
23+
tools: composer
24+
- name: Composer Install
25+
run: composer install --prefer-dist --no-interaction --optimize-autoloader --no-dev
26+
- run: npm compile
27+
- name: Package
28+
run: npx vsce package --out=artifacts/phpactor.vsix ${{ github.event.release.tag_name }}
2029
- name: 'Release Extension'
2130
uses: actions/upload-release-asset@v1
2231
env:

.gitignore

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
out
2-
node_modules
3-
.vscode-test
4-
artifacts/*
1+
out/
2+
node_modules/
3+
.vscode-test/
4+
artifacts/
5+
vendor/

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.vscode-test/
22
coverage/
33
out/
4+
vendor/
45
package-lock.json
56
package.json

.vscodeignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.github/**
2+
.vscode/**
3+
.vscode-test/**
4+
images/**
5+
!images/logo.png
6+
out/test/**
7+
src/**
8+
.gitignore
9+
.npmignore
10+
.prettierignore
11+
vendor/bin/**
12+
**/tsconfig.json
13+
**/.eslintrc.json
14+
**/*.map
15+
**/*.ts

composer.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"prefer-stable": true,
3+
"minimum-stability": "dev",
4+
"require": {
5+
"phpactor/phpactor": "2023.08.06-1"
6+
}
7+
}

0 commit comments

Comments
 (0)