Skip to content

Commit

Permalink
Setup release to GitHub package (#6)
Browse files Browse the repository at this point in the history
* add changeset cli

* add luco inc private repo settings

* add changeset version in package
  • Loading branch information
kkkaoru authored May 16, 2023
1 parent b980774 commit cd8e63a
Show file tree
Hide file tree
Showing 9 changed files with 877 additions and 1 deletion.
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": []
}
Empty file added .github/.gitkeep
Empty file.
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 }}
permissions:
contents: write
issues: write
packages: write
pull-requests: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup git config
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: ./.node-version
cache: 'pnpm'
registry-url: https://npm.pkg.github.com/
- name: Install
run: pnpm i --frozen-lockfile
- name: Create Release pull request or publish to github package
id: changesets
uses: changesets/action@v1
with:
publish: changeset:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
"eslint": "turbo run eslint",
"prettier": "turbo run prettier",
"license": "node ./scripts/license.js",
"changeset": "changeset",
"changeset:init": "changeset init",
"changeset:version": "changeset version",
"changeset:publish": "changeset publish",
"prepare": "pnpm run build",
"postinstall": "pnpm run license"
},
"dependencies": {
"@luco-inc/pnpm-license-exporter": "workspace:*"
},
"devDependencies": {
"@changesets/cli": "2.26.1",
"@typescript-eslint/parser": "5.59.6",
"@vitest/coverage-c8": "0.31.0",
"eslint": "8.40.0",
Expand Down
1 change: 1 addition & 0 deletions packages/pnpm-license-exporter/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@luco-inc:registry=https://npm.pkg.github.com
7 changes: 7 additions & 0 deletions packages/pnpm-license-exporter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @luco-inc/pnpm-license-exporter

## 1.0.0

### Major Changes

- publish pnpm license exporter
11 changes: 10 additions & 1 deletion packages/pnpm-license-exporter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luco-inc/pnpm-license-exporter",
"version": "0.0.0",
"version": "1.0.0",
"description": "",
"keywords": [],
"files": [
Expand All @@ -26,5 +26,14 @@
},
"devDependencies": {
"@types/node": "20.1.5"
},
"repository": "https://github.com/luco-inc/pnpm-license-exporter",
"bugs": {
"url": "https://github.com/luco-inc/pnpm-license-exporter/issues"
},
"homepage": "https://github.com/luco-inc/pnpm-license-exporter#readme",
"publishConfig": {
"access": "restricted",
"registry": "https://npm.pkg.github.com/"
}
}
Loading

0 comments on commit cd8e63a

Please sign in to comment.