-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚙️ Chore(enviroment): change CI/CD Github Actions, scripts at package…
…s and husky flow
- Loading branch information
1 parent
eaa9dd8
commit fdd5849
Showing
6 changed files
with
473 additions
and
1,012 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "install" | ||
description: "Sets up Node.js and runs install" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: 🚀 Setup pnpm | ||
uses: pnpm/[email protected] | ||
- name: 🟢 Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
registry-url: "https://registry.npmjs.org" | ||
cache: "pnpm" | ||
|
||
- name: 🤖 Setup Git User | ||
shell: bash | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "INEEDJ" | ||
- name: ↘️ Install dependencies | ||
shell: bash | ||
run: pnpm install --no-frozen-lockfile |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,20 @@ | ||
name: CI | ||
|
||
name: CI/CD | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
branches: [main] | ||
jobs: | ||
Continuous-Integration: | ||
Deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
- name: Format Files | ||
- name: 🟢 Setup | ||
uses: ./.github/common-actions/install | ||
- name: 📝 Lint | ||
run: pnpm lint | ||
- name: ♻️ Format | ||
run: pnpm format | ||
- name: Linting Files | ||
run: pnpm lint:fix --force && pnpm lint --force | ||
env: | ||
ESLINT_USE_FLAT_CONFIG: ${{ secrets.ESLINT_USE_FLAT_CONFIG }} | ||
- name: Building Files | ||
run: pnpm build | ||
- name: Start Files | ||
run: pnpm start | ||
- name: 🏗️ Build Package | ||
run: pnpm build:npm |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish Package to npmjs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🟢 Setup | ||
uses: ./.github/common-actions/install | ||
|
||
- name: 🗨️ Create Release Pull Request or Publish to NPM | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm npm:publish --no-git-checks --tag latest | ||
title: "🤖 ci(changesets): :package: version packages" | ||
commit: "🤖 ci(changesets): version packages" | ||
setupGitUser: false | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm pre:husky | ||
#!/bin/sh | ||
npm run pre:husky |
This file contains 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
Oops, something went wrong.