Skip to content

add release workflow #71

Merged
merged 3 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .github/workflows/build.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: pull-request

run-name: Run CI for ${{ github.head_ref }}

SuperOleg39 marked this conversation as resolved.
Show resolved Hide resolved
on:
pull_request:
branches:
- master

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
run:
runs-on: ubuntu-latest

strategy:
matrix:
node: [ 16, 18, 20 ]

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm run test:ci
SuperOleg39 marked this conversation as resolved.
Show resolved Hide resolved

- name: Check release
run: npm run release:dry

- name: Coveralls
uses: coverallsapp/github-action@master
env:
COVERALLS_FLAG_NAME: run-${{ matrix.node }}
SuperOleg39 marked this conversation as resolved.
Show resolved Hide resolved
with:
# https://github.com/orgs/community/discussions/25191#discussioncomment-3246770
git-commit: ${{ github.event.pull_request.head.sha }}
git-branch: ${{ github.head_ref }}
parallel: true

coveralls-finalize:
needs: run
runs-on: ubuntu-latest
steps:
- name: Coveralls finalize
uses: coverallsapp/github-action@master
with:
# https://github.com/orgs/community/discussions/25191#discussioncomment-3246770
git-commit: ${{ github.event.pull_request.head.sha }}
git-branch: ${{ github.head_ref }}
parallel-finished: true
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: release

on:
push:
branches:
- master

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
release:
if: "!contains(github.event.head_commit.message, 'chore(release)')"

runs-on: ubuntu-latest

steps:
- name: Initialize Git user
run: |
git config --global user.name 'tinkoff-bot'
git config --global user.email 'tinkoff-bot@users.noreply.github.com'

- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
run: npm run release
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

14 changes: 14 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"git": {
"commitMessage": "chore(release): version ${version}"
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md"
}
}
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 2.2.1
## 2.2.1

+ add check into the utility isEqual for comparision of functions by reference (#63)

Expand Down
Loading