Skip to content

Commit

Permalink
chore: start setup changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
raulfdm committed Sep 9, 2022
1 parent 8605d85 commit a5323d4
Show file tree
Hide file tree
Showing 7 changed files with 976 additions and 8 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/config@2.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
66 changes: 66 additions & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: SubTV CLI

on: push

env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store

jobs:
workflow:
name: Lint, test, build and deploy
runs-on: ubuntu-latest
steps:
- name: Git files setup
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Node Setup
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2.2.2
name: Install pnpm
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install --no-frozen-lockfile

- name: Run Lint
run: pnpm run lint

- name: Run tests
run: pnpm run test

- name: Run Build
run: pnpm run build

- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- name: create and publish versions
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 15 additions & 4 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Git files setup
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Node Setup
uses: actions/setup-node@v3
Expand Down Expand Up @@ -47,9 +49,18 @@ jobs:
- name: Run tests
run: pnpm run test

- name: Run tests
- name: Run Build
run: pnpm run build

- name: Run tests
if: contains(github.ref, 'main')
run: pnpm publish --no-git-checks -F @sub-tv/cli
- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- name: create and publish versions
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=http://localhost:4873/
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
"scripts": {
"build": "turbo run build",
"lint": "turbo run lint",
"test": "turbo run test"
"test": "turbo run test",
"ci:publish": "pnpm changeset publish"
},
"devDependencies": {
"@changesets/cli": "2.24.4",
"@typescript-eslint/eslint-plugin": "5.35.1",
"@typescript-eslint/parser": "5.35.1",
"concurrently": "7.3.0",
"eslint": "8.23.0",
"eslint-config-prettier": "8.5.0",
"npm-run-all": "4.1.5",
"prettier": "2.7.1",
"turbo": "1.4.3",
"typescript": "4.8.2",
"npm-run-all": "4.1.5",
"concurrently": "7.3.0"
"typescript": "4.8.2"
}
}
Loading

0 comments on commit a5323d4

Please sign in to comment.