Skip to content

Commit

Permalink
Merge pull request #6 from butaneprotocol/rvcas/setup-ci
Browse files Browse the repository at this point in the history
setup CI
  • Loading branch information
rvcas authored May 3, 2024
2 parents 803f7b2 + 53894ed commit 1cda0dc
Show file tree
Hide file tree
Showing 15 changed files with 4,547 additions and 2,534 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
46 changes: 46 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Check

on:
push:
branches:
- main
pull_request:

# cancel in-progress runs on new commits to same PR (gitub.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
check:
name: Release
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest

- name: 📦 Setup Node.js
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "latest"

- name: 🛠️ Install dependencies
run: pnpm install --frozen-lockfile

- name: 🧪 Run fmt check
run: pnpm prettier --check .

- name: 🧪 Run lint
run: pnpm lint

- name: 🧪 Run test
run: pnpm test

- name: 🎁 Run build
run: pnpm build
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- run: pnpm run docs
- uses: actions/upload-pages-artifact@v2
with:
path: ./docs
path: ./docs
deploy:
runs-on: ubuntu-latest
environment:
Expand All @@ -34,4 +34,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
# prevents this action from running on forks
if: github.repository == 'butaneprotocol/blaze'
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
name: Release
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest

- name: 📦 Setup Node.js
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "latest"

- name: 🛠️ Install dependencies
run: pnpm install --frozen-lockfile

- name: 🚀 Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
node_modules/
.turbo/
dist/
17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"lint": "turbo run lint",
"test": "turbo run test",
"clean": "turbo run clean",
"docs": "typedoc \"packages/*/*\" && mkdir docs/logo && cp logo/blaze.svg docs/logo/blaze.svg",
"fmt": "prettier -w *.ts */*.ts */*/*.ts *.json"
"docs": "typedoc \"packages/*\" && mkdir docs/logo && cp logo/blaze.svg docs/logo/blaze.svg",
"fmt": "prettier -w .",
"changeset": "changeset",
"release": "turbo run build && changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@types/jest": "^29.5.5",
"@types/node": "^20.12.7",
"eslint": "^9.1.1",
Expand All @@ -22,14 +25,6 @@
"ts-jest": "^29.1.1",
"turbo": "^1.13.3",
"typedoc": "^0.25.13",
"typescript": "^5.3.3",
"@blazecardano/blueprint": "workspace:*",
"@blazecardano/core": "workspace:*",
"@blazecardano/emulator": "workspace:*",
"@blazecardano/query": "workspace:*",
"@blazecardano/sdk": "workspace:*",
"@blazecardano/tsconfig": "workspace:*",
"@blazecardano/tx": "workspace:*",
"@blazecardano/wallet": "workspace:*"
"typescript": "^5.3.3"
}
}
4 changes: 3 additions & 1 deletion packages/blaze-blueprint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": ["dist/**"],
"files": [
"dist/**"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
Expand Down
4 changes: 3 additions & 1 deletion packages/blaze-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": ["dist/**"],
"files": [
"dist/**"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external rxjs",
Expand Down
4 changes: 3 additions & 1 deletion packages/blaze-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": ["dist/**"],
"files": [
"dist/**"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external rxjs",
Expand Down
4 changes: 3 additions & 1 deletion packages/blaze-tx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"require": "./dist/value.js"
}
},
"files": ["dist/**"],
"files": [
"dist/**"
],
"scripts": {
"build": "tsup src/index.ts src/value.ts --format esm,cjs --dts --external rxjs",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external rxjs",
Expand Down
4 changes: 3 additions & 1 deletion packages/blaze-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": ["dist/**"],
"files": [
"dist/**"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external rxjs",
Expand Down
Loading

0 comments on commit 1cda0dc

Please sign in to comment.