chore(deps): update devdependencies major (major) #2374
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
name: Test and build | |
on: | |
push: | |
branches: | |
- master | |
- beta | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
if: "!contains(github.event.head_commit.message, 'ci skip')" | |
name: Build and test on node ${{ matrix.node_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [14.x] | |
os: [ubuntu-latest] | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# NOTE @v2 uses the token as an auth http header. Set it to | |
# a Personal Access Token instead of secrets.GITHUB_TOKEN | |
# so that tag pushes trigger repo push events. | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- name: lerna info | |
run: yarn lerna info | |
- name: build | |
run: yarn lerna run build | |
- name: Build/release Electron app | |
uses: samuelmeuli/action-electron-builder@v1 | |
with: | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
release: false | |
package_root: ui | |
skip_build: true | |
args: --linux AppImage --publish never | |
- name: make CLI script executable | |
run: chmod +x cli/dist/index.js # make the script executable for tests | |
- name: lint | |
run: yarn lerna run lint --parallel | |
- name: test | |
run: yarn lerna run test --parallel -- -- --coverage --watchAll=false | |
- name: Stryker mutation testing | |
run: yarn lerna run stryker:run | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: NPM publish packages | |
if: github.ref == 'refs/heads/master' | |
run: | | |
git config --local user.email "magoo@magoo.dev" | |
git config --local user.name "Ma�l GOUACIDE" | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc | |
yarn lerna publish patch --yes --message "publish %s - ci skip" --no-push --create-release github --conventional-commits | |
env: | |
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: 'Get Previous tag' | |
if: github.ref == 'refs/heads/master' | |
id: previoustag | |
uses: 'WyriHaximus/github-action-get-previous-tag@master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Push new version changes | |
if: github.ref == 'refs/heads/master' | |
uses: ad-m/github-push-action@master | |
with: | |
tags: true | |
force: true | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Create Release | |
if: github.ref == 'refs/heads/master' | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ steps.previoustag.outputs.tag }} | |
release_name: Release ${{ steps.previoustag.outputs.tag }} | |
draft: false | |
prerelease: false | |
- name: Upload binaries to release | |
if: github.ref == 'refs/heads/master' | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
tag: ${{ steps.previoustag.outputs.tag }} | |
overwrite: true | |
file: ui/dist/* | |
file_glob: true | |
- name: Deploy on gh-pages | |
if: github.ref == 'refs/heads/master' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
publish_dir: ./ui/build |