-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(semantic-release): install and configure semantic-release
- Loading branch information
1 parent
b4f7e97
commit c177c9e
Showing
4 changed files
with
14,619 additions
and
3,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# PHP -------------------------------------------------------------------- | ||
- name: Setup PHP 7.4 environment | ||
uses: nanasess/setup-php@v3.0.6 | ||
with: | ||
php-version: 7.4 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Composer (cache) | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Linting PHP code | ||
run: composer cs:php | ||
|
||
# npm -------------------------------------------------------------------- | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2.1.2 | ||
with: | ||
node-version: '12' | ||
|
||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- name: NPM (cache) | ||
uses: actions/cache@v2 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install Node.js dependencies | ||
run: npm install | ||
|
||
- name: Linting general code | ||
run: npm run cs:lint | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: npx semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.