Skip to content

Bump smee-client from 1.2.3 to 2.0.0 #43

Bump smee-client from 1.2.3 to 2.0.0

Bump smee-client from 1.2.3 to 2.0.0 #43

Workflow file for this run

name: 'main'
concurrency: main_environment
on:
push:
branches: main
pull_request:
branches: main
jobs:
tests:
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: 'Checkout sources'
uses: actions/checkout@v3
- name: 'Setup NodeJS'
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: 'Install dependencies'
run: yarn install
- name: 'Build distribution'
run: yarn dist
- name: 'Run unit-tests'
run: yarn test
- name: 'Run linter'
run: yarn run lint
- name: 'Run code coverage'
run: yarn run coverage
- name: 'Upload code coverage report'
run: bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_SECRET_TOKEN }}
release:
runs-on: ubuntu-latest
needs: tests
if: ${{ github.event_name == 'push' }}
steps:
- name: 'Checkout sources'
uses: actions/checkout@v3
- name: 'Setup NodeJS'
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: 'Install dependencies'
run: yarn install
- name: 'Build distribution'
run: yarn dist
- name: 'Semantic Release'
id: semantic
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'GitHub release'
if: steps.semantic.outputs.new_release_published == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.semantic.outputs.new_release_version }}
- name: 'Commit GitHub Action distribution'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add dist/index.js
git commit -m "Build by GitHub Actions" || true
if: job.status == 'success'
- name: 'Push changes'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: true
if: job.status == 'success'