Skip to content

Commit 5d0128a

Browse files
committed
chore(github-actions): add test and release actions
1 parent af592c4 commit 5d0128a

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: New Release
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@master
13+
- name: New Release
14+
uses: cycjimmy/semantic-release-action@v2
15+
id: release # Need an `id` for output variables
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
NPM_TOKEN: 000000000000000
19+
GIT_AUTHOR_NAME: sudkumar
20+
GIT_COMMITTER_NAME: sudkumar
21+
with:
22+
extra_plugins: |
23+
@semantic-release/git
24+
@semantic-release/changelog

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
laravel-tests:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php-versions: ['7.1', '7.2', '7.3', '7.4']
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Setup PHP with extensions
19+
uses: shivammathur/setup-php@v1
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
- name: Install Dependencies
23+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
24+
- name: Execute tests
25+
run: composer run-script test

.releaserc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
[
7+
"@semantic-release/git",
8+
{
9+
"message": "chore(release): ${nextRelease.version} :tada: :rocket:\n\n${nextRelease.notes}"
10+
}
11+
],
12+
"@semantic-release/github"
13+
]
14+
}

0 commit comments

Comments
 (0)