Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
feat: Added CI pipeline for @relab/rejs-swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyzwezdin committed Feb 4, 2024
1 parent 93b8786 commit 6e2d2c9
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: rejs (development channel)
on:
push:
branches:
- master
- development
paths:
- packages/rejs/**
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/swagger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: rejs (development channel)

on:
push:
branches:
- master
- development
paths:
- packages/rejs/**

jobs:
release:
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
name: Release
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: '20'
- id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
continue-on-error: true
run: npm list
- run: npm ci -ws
- run: npx semantic-release
working-directory: ./packages/rejs-swagger
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_BOT_CHAT_ID: ${{ vars.TELEGRAM_BOT_CHAT_ID }}
29 changes: 29 additions & 0 deletions packages/rejs-swagger/.releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const common = require('@sergeyzwezdin/semantic-release-commits-config')

module.exports = {
...common,
branches: [{ name: 'master' }, { name: 'development', channel: 'development', prerelease: 'dev' }],
tagFormat: 'swagger-v${version}',
plugins: [
...common.plugins,
'@semantic-release/npm',
[
'@semantic-release/git',
{
assets: ['packages/rejs-swagger/package.json', 'packages/rejs-swagger/package-lock.json'],
message: 'Update package.json version to ${nextRelease.version}',
},
],
'@semantic-release/github',
[
'semantic-release-telegram-bot',
{
notifications: [
{
chatIds: process.env.TELEGRAM_BOT_CHAT_ID,
},
],
},
],
],
}

0 comments on commit 6e2d2c9

Please sign in to comment.