Skip to content

Commit

Permalink
feat(ci): add release workflow with release-it
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Ryazanov committed Jul 14, 2023
1 parent e616cbd commit 68248b5
Show file tree
Hide file tree
Showing 9 changed files with 7,818 additions and 6,281 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: master

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
Expand Down
60 changes: 29 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,42 @@
name: Release
name: release

on:
pull_request:
branches:
- master
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:
- run: echo 'Test'
# - uses: actions/checkout@v2
# with:
# token: ${{ secrets.TINKOFF_BOT_PAT }}
# fetch-depth: 0
#
# - name: Git Identity
# run: |
# git config --global user.name 'tinkoff-bot'
# git config --global user.email '[email protected]'
#
# - uses: actions/setup-node@v2
# with:
# node-version: '14.x'
# registry-url: 'https://registry.npmjs.org'
#
# - name: Clean install
# run: npm ci
#
# - name: Create release commit and tag
# run: |
# npm run version -- --no-push
#
# - name: Push release commit and tag
# run: git push --follow-tags
#
# - name: Publish packages
# run: npm run publish:ci
# env:
# NODE_AUTH_TOKEN: ${{ secrets.TINKOFF_NPM_AUTH_TOKEN }}
- name: Initialize Git user
run: |
git config --global user.name 'tinkoff-bot'
git config --global user.email '[email protected]'
- 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
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"
}
}
}
Loading

0 comments on commit 68248b5

Please sign in to comment.