From 70c28a83ae1897f773cb10000f771eceeb8cd976 Mon Sep 17 00:00:00 2001 From: Fynn Feldpausch Date: Mon, 16 Oct 2023 18:53:39 +0200 Subject: [PATCH] feat: bootstrap releases (#402) --- .github/workflows/angular.yml | 60 ++++---- .github/workflows/core.yml | 214 +++++++++++++-------------- .github/workflows/deploy.yml | 82 +++++----- .github/workflows/react.yml | 58 ++++---- .github/workflows/release-please.yml | 39 +++++ .github/workflows/release.yml | 30 ++-- .github/workflows/tokens.yml | 66 ++++----- .release-please-manifest.json | 7 + release-please-config.json | 33 +++++ 9 files changed, 334 insertions(+), 255 deletions(-) create mode 100644 .github/workflows/release-please.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/angular.yml b/.github/workflows/angular.yml index ce65d330..e3e148e0 100644 --- a/.github/workflows/angular.yml +++ b/.github/workflows/angular.yml @@ -1,30 +1,30 @@ -name: 'Angular' -on: - push: - branches: - - '*' - paths: - - 'angular/**' -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install and Build - run: | - pnpm install - pnpm run build:tokens - pnpm run build:core - pnpm run build:angular - pnpm run build:angular-formly +# name: 'Angular' +# on: +# push: +# branches: +# - '*' +# paths: +# - 'angular/**' +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install and Build +# run: | +# pnpm install +# pnpm run build:tokens +# pnpm run build:core +# pnpm run build:angular +# pnpm run build:angular-formly diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 4342f49f..cc84c753 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -1,107 +1,107 @@ -name: 'Core' -on: - push: - branches: - - '*' - paths: - - 'core/**' -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install and Build - run: | - pnpm install - pnpm run build:tokens - pnpm run build:core - prettier: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install and Check - run: | - pnpm install - pnpm --filter @haiilo/catalyst run prettier:check - eslint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install and Lint - run: | - pnpm install - pnpm --filter @haiilo/catalyst run lint - stylelint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install and Lint - run: | - pnpm install - pnpm --filter @haiilo/catalyst run lint:style - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install Chrome - run: sudo apt-get install -y google-chrome-stable - - name: Install and Test - run: | - pnpm install - pnpm run build:tokens - pnpm --filter @haiilo/catalyst run test +# name: 'Core' +# on: +# push: +# branches: +# - '*' +# paths: +# - 'core/**' +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install and Build +# run: | +# pnpm install +# pnpm run build:tokens +# pnpm run build:core +# prettier: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install and Check +# run: | +# pnpm install +# pnpm --filter @haiilo/catalyst run prettier:check +# eslint: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install and Lint +# run: | +# pnpm install +# pnpm --filter @haiilo/catalyst run lint +# stylelint: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install and Lint +# run: | +# pnpm install +# pnpm --filter @haiilo/catalyst run lint:style +# test: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install Chrome +# run: sudo apt-get install -y google-chrome-stable +# - name: Install and Test +# run: | +# pnpm install +# pnpm run build:tokens +# pnpm --filter @haiilo/catalyst run test diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ef63eacf..1de0f8bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,41 +1,41 @@ -name: 'Deploy' -on: - push: - branches: - - main - paths: - - 'core/**' -jobs: - gh-pages: - concurrency: ci-${{ github.ref }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install and Build - run: | - pnpm install - pnpm run build:tokens - pnpm run build:core - - name: Find and Replace - uses: jacobtomlinson/gha-find-replace@v2 - with: - find: '/build/' - replace: 'https://haiilo.github.io/catalyst/build/' - regex: false - include: core/www/index.html - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4.2.3 - with: - branch: gh-pages - folder: core/www +# name: 'Deploy' +# on: +# push: +# branches: +# - main +# paths: +# - 'core/**' +# jobs: +# gh-pages: +# concurrency: ci-${{ github.ref }} +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install and Build +# run: | +# pnpm install +# pnpm run build:tokens +# pnpm run build:core +# - name: Find and Replace +# uses: jacobtomlinson/gha-find-replace@v2 +# with: +# find: '/build/' +# replace: 'https://haiilo.github.io/catalyst/build/' +# regex: false +# include: core/www/index.html +# - name: Deploy +# uses: JamesIves/github-pages-deploy-action@v4.2.3 +# with: +# branch: gh-pages +# folder: core/www diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml index 926cc278..3b040f51 100644 --- a/.github/workflows/react.yml +++ b/.github/workflows/react.yml @@ -1,29 +1,29 @@ -name: 'React' -on: - push: - branches: - - '*' - paths: - - 'react/**' -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install and Build - run: | - pnpm install - pnpm run build:tokens - pnpm run build:core - pnpm run build:react +# name: 'React' +# on: +# push: +# branches: +# - '*' +# paths: +# - 'react/**' +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install and Build +# run: | +# pnpm install +# pnpm run build:tokens +# pnpm run build:core +# pnpm run build:react diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..a04b39f8 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,39 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + with: + command: manifest + - uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'pnpm' + registry-url: 'https://registry.npmjs.org' + if: ${{ steps.release.outputs.release_created }} + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + if: ${{ steps.release.outputs.release_created }} + - run: pnpm install + if: ${{ steps.release.outputs.release_created }} + - run: pnpm run build + if: ${{ steps.release.outputs.release_created }} + - run: pnpm run publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ steps.release.outputs.release_created }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91ebe3dd..270216ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,15 @@ -name: 'Release' -on: - push: - tags: - - "v*.*.*" -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Release - uses: softprops/action-gh-release@v1 - with: - body_path: CHANGELOG.md +# name: 'Release' +# on: +# push: +# tags: +# - "v*.*.*" +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Release +# uses: softprops/action-gh-release@v1 +# with: +# body_path: CHANGELOG.md diff --git a/.github/workflows/tokens.yml b/.github/workflows/tokens.yml index c7712c05..ef62b44f 100644 --- a/.github/workflows/tokens.yml +++ b/.github/workflows/tokens.yml @@ -1,33 +1,33 @@ -name: 'Tokens' -on: - push: - branches: - - '*' - paths: - - 'tokens/**' -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - name: Install and Build - run: | - pnpm install - pnpm run build:tokens - - name: Commit files - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: 'CI: update tokens' - commit_user_name: GitHub Actions - commit_user_email: actions@github.com +# name: 'Tokens' +# on: +# push: +# branches: +# - '*' +# paths: +# - 'tokens/**' +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup pnpm +# uses: pnpm/action-setup@v2 +# with: +# version: 8 +# - name: Setup Node +# uses: actions/setup-node@v3 +# with: +# node-version-file: .nvmrc +# cache: pnpm +# cache-dependency-path: pnpm-lock.yaml +# - name: Install and Build +# run: | +# pnpm install +# pnpm run build:tokens +# - name: Commit files +# uses: stefanzweifel/git-auto-commit-action@v4 +# with: +# commit_message: 'CI: update tokens' +# commit_user_name: GitHub Actions +# commit_user_email: actions@github.com diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..b68ae5ff --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,7 @@ +{ + "tokens": "6.5.1", + "core": "6.5.1", + "angular/projects/catalyst": "6.5.1", + "angular/projects/catalyst-formly": "6.5.1", + "react": "6.5.1" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..ded2566a --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + "tokens": { + "component": "catalyst-tokens" + }, + "core": { + "component": "catalyst-core" + }, + "angular/projects/catalyst": { + "component": "catalyst-angular" + }, + "angular/projects/catalyst-formly": { + "component": "catalyst-angular-formly" + }, + "react": { + "component": "catalyst-react" + } + }, + "plugins": [ + { + "type": "linked-versions", + "groupName": "catalyst", + "components": [ + "catalyst-tokens", + "catalyst-core", + "catalyst-angular", + "catalyst-angular-formly", + "catalyst-react" + ] + } + ] +}