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

Commit

Permalink
ci: add release job
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 11, 2023
1 parent 2dd59fe commit 86000f3
Show file tree
Hide file tree
Showing 12 changed files with 21,706 additions and 8,538 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run build
- run: npm run check
- run: npm run lint
- run: npm run prettier -- --check
- run: npm run test
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ⚠️ Release @tinkoff/tui-editor
on:
workflow_dispatch:
inputs:
forcePush:
type: boolean
required: false
description: --force-publish package
mode:
type: choice
description: force package to be versioned (depend --force-publish)
required: false
default: minor
options:
- patch
- minor
- major

jobs:
run-release:
name: Run release
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
steps:
- uses: taiga-family/ci/actions/setup/[email protected]
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/config/[email protected]
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
- uses: taiga-family/ci/actions/setup/config/[email protected]
with:
token: ${{ secrets.TINKOFF_SCOPE_NPM_TOKEN }}

- name: Lerna update version of packages
if: always()
run: |
if [[ ${{ github.event.inputs.forcePush }} == "true" ]]; then
npx lerna version ${{ github.event.inputs.mode }} --no-private --force-publish
else
npx lerna version --no-private
fi
- run: npx nx build angular-contenteditable-accessor

- run: npx nx publish angular-contenteditable-accessor
if: always()

- id: info
run: |
echo "version=@tinkoff/angular-contenteditable-accessor@$(node -p "require('./projects/angular-contenteditable-accessor/package.json').version")" >> $GITHUB_OUTPUT
- name: Announce to Telegram
uses: taiga-family/ci/actions/messenger/telegram/[email protected]
with:
chatId: ${{ secrets.TAIGA_TELEGRAM_CHAT_ID }}
topicId: ${{ secrets.TAIGA_TELEGRAM_CHAT_THREAD_ID }}
token: ${{ secrets.TAIGA_TELEGRAM_BOT_TOKEN }}
version: ${{ steps.info.outputs.version }}

concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
111 changes: 0 additions & 111 deletions angular.json

This file was deleted.

33 changes: 33 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"packages": ["projects/*"],
"concurrency": 1,
"stream": true,
"npmClient": "npm",
"changelog": true,
"private": false,
"conventionalCommits": true,
"ignoreChanges": [
"**/node_modules/**",
"**/dist/**",
"**/tests/**",
"**/*.spec.ts",
"**/.github/**",
"**/CHANGELOG.md",
"**/project.json",
"**/ng-packages.json"
],
"command": {
"version": {
"allowBranch": "main",
"commitHooks": false,
"createRelease": "github"
},
"publish": {
"yes": true,
"registry": "https://registry.npmjs.org",
"message": "chore(release): publish @tinkoff/angular-contenteditable-accessor"
}
}
}
37 changes: 37 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"npmScope": "angular-contenteditable-accessor",
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {
"parallel": 1,
"cacheableOperations": ["build", "test", "lint"]
}
}
},
"affected": {
"defaultBase": "origin/main"
},
"workspaceLayout": {
"libsDir": "projects",
"appsDir": "projects"
},
"defaultProject": "demo",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [
"{workspaceRoot}/nx.json",
"{workspaceRoot}/tsconfig.*.json",
"{workspaceRoot}/tsconfig.json"
]
},
"targetDefaults": {
"build": {
"inputs": ["default"]
},
"test": {
"inputs": ["default"]
}
}
}
Loading

0 comments on commit 86000f3

Please sign in to comment.