Skip to content

Commit 2013805

Browse files
committed
Merge branch 'master' into HP-2069
2 parents a867b19 + 08c9e87 commit 2013805

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

Diff for: .github/workflows/main.yml

+25-5
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,42 @@ name: CI
22

33
on:
44
push:
5+
branches: [ master ]
56
tags:
67
- "*.*.*"
78

89
jobs:
9-
release:
10+
test:
1011
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Install PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: 8.3
18+
tools: composer:v2
19+
- name: Cache Composer packages
20+
uses: actions/cache@v4
21+
with:
22+
path: vendor
23+
key: composer-${{ hashFiles('composer.json') }}
24+
- name: Install composer packages
25+
run: composer install
26+
- name: Test PHPUnit
27+
run: vendor/bin/phpunit
1128

29+
release:
30+
runs-on: ubuntu-latest
31+
if: startsWith(github.event.ref, 'refs/tags/')
32+
needs: test
1233
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v2
34+
- uses: actions/checkout@v4
35+
- uses: actions/setup-node@v4
1536
with:
16-
node-version: '14.x'
1737
registry-url: 'https://registry.npmjs.org'
1838
- run: npm install && npm run build
1939
- run: npm publish --access public
2040
env:
2141
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2242
- name: Release
23-
uses: softprops/action-gh-release@v1
43+
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)