ci: New CI/CD process #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 📦 Create Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tagChoice: | ||
description: "Select projects by tag" | ||
required: false | ||
default: "" | ||
type: choice | ||
options: | ||
- "" | ||
- tag:type:publish | ||
- tag:lib:json-api-nestjs | ||
- tag:lib:nestjs-json-rpc | ||
json_api_nestjs: | ||
description: "Select json-api-nestjs" | ||
required: false | ||
default: "false" | ||
json_api_nestjs_sdk: | ||
description: "Select json-api-nestjs-sdk" | ||
required: false | ||
default: "false" | ||
nestjs_json_rpc: | ||
description: "Select nestjs-json-rpc" | ||
required: false | ||
default: "false" | ||
nestjs_json_rpc_sdk: | ||
description: "Select nestjs-json-rpc-sdk" | ||
required: false | ||
default: "false" | ||
json_api_nestjs_microorm: | ||
description: "Select json-api-nestjs-microorm" | ||
required: false | ||
default: "false" | ||
json_api_nestjs_shared: | ||
description: "Select json-api-nestjs-shared" | ||
required: false | ||
default: "false" | ||
json_api_nestjs_typeorm: | ||
description: "Select json-api-nestjs-typeorm" | ||
required: false | ||
default: "false" | ||
first-release: | ||
description: 'Is first release?' | ||
required: false | ||
type: boolean | ||
default: false | ||
beta-release: | ||
description: 'Is beta release?' | ||
required: false | ||
type: boolean | ||
default: false | ||
dry-run: | ||
description: 'Is dry run?' | ||
required: false | ||
type: boolean | ||
default: false | ||
jobs: | ||
compute-projects: | ||
uses: ./.github/workflows/compute-projects.yml | ||
with: | ||
tagChoice: ${{ github.event.inputs.tagChoice }} | ||
json_api_nestjs: ${{ github.event.inputs.json_api_nestjs }} | ||
json_api_nestjs_sdk: ${{ github.event.inputs.json_api_nestjs_sdk }} | ||
nestjs_json_rpc: ${{ github.event.inputs.nestjs_json_rpc }} | ||
nestjs_json_rpc_sdk: ${{ github.event.inputs.nestjs_json_rpc_sdk }} | ||
json_api_nestjs_microorm: ${{ github.event.inputs.json_api_nestjs_microorm }} | ||
json_api_nestjs_shared: ${{ github.event.inputs.json_api_nestjs_shared }} | ||
json_api_nestjs_typeorm: ${{ github.event.inputs.json_api_nestjs_typeorm }} | ||
test: | ||
need: [compute-projects] | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
mainBranch: "last-tag" | ||
secrets: | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
e2e-test: | ||
needs: [test] | ||
uses: ./.github/workflows/e2e-test.yaml | ||
with: | ||
mainBranch: "last-tag" | ||
secrets: | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
build: | ||
needs: [test, e2e-test] | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
mainBranch: "last-tag" | ||
secrets: | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
upload-badge: | ||
needs: [ test, e2e-test ] | ||
uses: ./.github/workflows/upload-badge.yaml | ||
with: | ||
mainBranch: "last-tag" | ||
secrets: | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
bump-version: | ||
needs: [build] | ||
uses: ./.github/workflows/bump-version.yml | ||
with: | ||
projects: ${{ needs.compute-projects.outputs.finalProjects }} | ||
first-release: ${{ needs.compute-projects.outputs.first-release }} | ||
beta-release: ${{ needs.compute-projects.outputs.beta-release }} | ||
dry-run: ${{ needs.compute-projects.outputs.dry-run }} |