Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDP-1623] Add changeset #8

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
18 changes: 18 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/cli/changelog-github",
{
"repo": "gsoft-inc/wl-openapi-typescript"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"debug"
]
}
5 changes: 5 additions & 0 deletions .changeset/red-cobras-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@workleap/create-schemas": patch
tjosepo marked this conversation as resolved.
Show resolved Hide resolved
---

Add changeset to project
40 changes: 18 additions & 22 deletions .github/workflows/publish.yml
asimmon marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,56 @@ name: Publish

on:
push:
branches: ["main"]
tags: ["*.*.*"]
tjosepo marked this conversation as resolved.
Show resolved Hide resolved
paths-ignore: ["*.md"]
branches:
- main

env:
CI: true

# Pnpm setup based on https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
version:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write # required for provenance https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/checkout@v4
tjosepo marked this conversation as resolved.
Show resolved Hide resolved

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"

- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
tjosepo marked this conversation as resolved.
Show resolved Hide resolved

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run changeset:publish
tjosepo marked this conversation as resolved.
Show resolved Hide resolved
env:
NODE_AUTH_TOKEN: ${{secrets.WORKLEAP_NPM_TOKEN}}

- name: Publish
run: pnpm run release
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.WORKLEAP_NPM_TOKEN }}
8 changes: 4 additions & 4 deletions debug/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "debug",
"private": true,
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"run-with-download": "pnpm dlx @workleap/create-schemas arg1 arg2",
"run-from-dev-dep": "pnpm create-schemas args1 args2"
"run": "create-schemas args1 args2"
},
"devDependencies": {
"@workleap/create-schemas": "0.0.1-preview.0"
"@workleap/create-schemas": "workspace:*"
tjosepo marked this conversation as resolved.
Show resolved Hide resolved
},
"keywords": [],
"author": "",
"license": "ISC"
}
}
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@
},
"scripts": {
"postinstall": "pnpm -r --parallel --include-workspace-root exec pnpm dlx rimraf node_modules/.cache",

"dev": "pnpm --filter \"./packages/**\" -r dev",
"build": "pnpm --filter \"./packages/**\" -r build",

"lint": "pnpm run \"/^lint:.*/\"",
"lint:eslint": "eslint --ext .js,.ts,.tsx . --max-warnings=-1 --cache --cache-location node_modules/.cache/eslint",
"lint:types": "pnpm -r --parallel --include-workspace-root exec tsc",

"eslint-fix": "eslint . --fix",

"release": "pnpm build && pnpm -r --filter \"./packages/**\" publish --no-git-checks --access=public",

"reset": "pnpm clean && pnpm reset:modules",
"clean": "pnpm -r --parallel --include-workspace-root exec pnpm dlx rimraf dist node_modules/.cache",
"reset:modules": "pnpm -r --parallel --include-workspace-root exec pnpm dlx rimraf node_modules pnpm-lock.yaml"
"reset:modules": "pnpm -r --parallel --include-workspace-root exec pnpm dlx rimraf node_modules pnpm-lock.yaml",
"changeset": "changeset",
"changeset:publish": "pnpm run build && changeset publish"
},
"devDependencies": {
"@changesets/cli": "2.27.7",
"@workleap/eslint-plugin": "3.2.2",
"@workleap/typescript-configs": "3.0.2",
"eslint": "8.57.0",
Expand All @@ -36,4 +33,4 @@
"engines": {
"node": ">=18.0.0"
}
}
}
6 changes: 2 additions & 4 deletions packages/create-schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
"type": "module",
"bin": "./dist/bin.js",
"scripts": {
"dev": "pnpm run build && pnpm run dev:link && pnpm run dev:tsup",
"dev:link": "pnpm link --global",
"dev:tsup": "tsup --config tsup.dev.ts",
"dev": "tsup --config tsup.dev.ts",
"build": "tsup --config tsup.build.ts"
},
"devDependencies": {
Expand All @@ -40,4 +38,4 @@
"typescript": "5.4.5",
"yargs-parser": "21.1.1"
}
}
}
Loading
Loading