Skip to content

Commit

Permalink
ci: add release job (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Oct 12, 2023
1 parent 4f9296d commit d9e000c
Show file tree
Hide file tree
Showing 26 changed files with 19,979 additions and 9,226 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: taiga-family/ci/actions/setup/project@v1.32.2
- uses: taiga-family/ci/actions/setup/project@v1.33.1
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
10 changes: 5 additions & 5 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
outputs:
matrix: ${{ steps.matrix.outputs.value }}
steps:
- uses: taiga-family/ci/actions/setup/checkout@v1.32.2
- uses: taiga-family/ci/actions/setup/variables@v1.32.2
- uses: taiga-family/ci/actions/setup/checkout@v1.33.1
- uses: taiga-family/ci/actions/setup/variables@v1.33.1
- id: matrix
if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true'
run: echo "value=$JOBS_NAME" >> $GITHUB_OUTPUT
Expand All @@ -24,7 +24,7 @@ jobs:
matrix:
value: ${{ fromJSON(needs.setup.outputs.matrix) }}
steps:
- uses: taiga-family/ci/actions/run/wait-job@v1.32.2
- uses: taiga-family/ci/actions/run/wait-job@v1.33.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
job: ${{ matrix.value }}
Expand All @@ -33,11 +33,11 @@ jobs:
needs: [wait]
runs-on: ubuntu-latest
steps:
- uses: taiga-family/ci/actions/auto/approve/double@v1.32.2
- uses: taiga-family/ci/actions/auto/approve/double@v1.33.1
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}
- uses: taiga-family/ci/actions/run/merge@v1.32.2
- uses: taiga-family/ci/actions/run/merge@v1.33.1
with:
token: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/variables@v1.32.2
- uses: taiga-family/ci/actions/setup/variables@v1.33.1
- uses: toshimaru/[email protected]
if: env.IS_OWNER_MODE == 'true'
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auto-cleanup-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/auto/cleanup-cache@v1.32.2
- uses: taiga-family/ci/actions/auto/cleanup-cache@v1.33.1
if: github.event_name == 'push'
with:
branch-name: ${{ github.head_ref || github.ref_name }}
- uses: taiga-family/ci/actions/auto/cleanup-cache@v1.32.2
- uses: taiga-family/ci/actions/auto/cleanup-cache@v1.33.1
if: github.event_name == 'pull_request'
with:
branch-name: refs/pull/${{ github.event.pull_request.number }}/merge
2 changes: 1 addition & 1 deletion .github/workflows/auto-dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/security/dependency-review@v1.32.2
- uses: taiga-family/ci/actions/security/dependency-review@v1.33.1
4 changes: 2 additions & 2 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/variables@v1.32.2
- uses: taiga-family/ci/actions/auto/label-when-approved@v1.32.2
- uses: taiga-family/ci/actions/setup/variables@v1.33.1
- uses: taiga-family/ci/actions/auto/label-when-approved@v1.33.1
with:
approvals: 1
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/auto-remove-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/auto/remove-label@v1.32.2
- uses: taiga-family/ci/actions/auto/remove-label@v1.33.1
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run build
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run prettier -- --check
- run: npm run lint
- run: npm run build
env:
NODE_OPTIONS: --openssl-legacy-provider
- run: npm run test
env:
NODE_OPTIONS: --openssl-legacy-provider
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
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 ng-polymorpheus

- run: npx nx publish ng-polymorpheus
if: always()

- id: info
run: |
echo "version=@tinkoff/ng-polymorpheus@$(node -p "require('./projects/ng-polymorpheus/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
154 changes: 0 additions & 154 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/ng-polymorpheus"
}
}
}
37 changes: 37 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"npmScope": "ng-polymorpheus",
"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 d9e000c

Please sign in to comment.