Skip to content

Commit

Permalink
chore: restore previous github flows
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelfimov committed Jan 26, 2024
1 parent 836adb5 commit 56eecea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 35 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Checks

on:
workflow_call:
on: [pull_request]

jobs:
run:
Expand All @@ -14,34 +13,22 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 19
node-version: '18.13'

- name: Install
run: yarn install

- name: Lint
run: yarn checks lint
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

- name: TypeCheck
run: yarn checks typecheck
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: TestUnit
run: yarn checks test unit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --experimental-vm-modules

- name: TestIntegration
run: yarn checks test integration
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --experimental-vm-modules
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

- name: Release
run: yarn checks release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
19 changes: 8 additions & 11 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Publish

on:
workflow_call:
secrets:
npmAuthToken:
required: true
workflow_dispatch:

jobs:
run:
Expand All @@ -20,24 +17,24 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 19
node-version: '18.13'

- name: Install
run: yarn install

- name: Npm Publish
run: |
yarn version apply --all
yarn workspaces changed foreach --worktree --verbose --topological --no-private npm publish --access public
yarn workspaces changed foreach --verbose --topological --no-private npm publish --access public
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.npmAuthToken }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Commit changes
uses: EndBug/add-and-commit@v9
uses: EndBug/add-and-commit@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
default_author: github_actions
author_name: github-actions
author_email: [email protected]
message: 'chore(common): publish'
add: '["*.lock", "*.json", "*.yml"]'
branch: master
15 changes: 9 additions & 6 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Version

on:
workflow_call:
pull_request:
types: [closed]
branches:
- master

jobs:
run:
name: Version
runs-on: ubuntu-latest

if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -17,24 +20,24 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '19'
node-version: '18.13'

- name: Install
run: yarn install
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

- name: Version
run: yarn workspaces changed foreach --worktree --no-private --verbose version patch --deferred
run: yarn workspaces changed foreach --no-private --verbose version patch --deferred
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

- name: Commit changes
uses: EndBug/add-and-commit@v9
uses: EndBug/add-and-commit@v7
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
author_name: github-actions
author_email: [email protected]
message: 'chore(common): versions'
add: '*.yml'
branch: master

0 comments on commit 56eecea

Please sign in to comment.