Skip to content

Commit

Permalink
Update to use pnpm and changesets from root (#71)
Browse files Browse the repository at this point in the history
* Update to use pnpm and changesets from root

* Update create versioning pr workflow
  • Loading branch information
scme0 authored Feb 18, 2024
1 parent da23935 commit 23a869b
Show file tree
Hide file tree
Showing 9 changed files with 1,960 additions and 2,974 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ with multi-package repos, or single-package repos to help you version and publis
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)
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {"version": true, "tag": true}
}
"privatePackages": {
"version": true,
"tag": true
}
}
5 changes: 5 additions & 0 deletions .changeset/slimy-apricots-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kubernetes-agent": patch
---

Update repo to use pnpm and changesets at the root instead of in the /charts/kubernetes-agent directory
27 changes: 15 additions & 12 deletions .github/workflows/create-versioning-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: ./charts/kubernetes-agent/package-lock.json

- name: npm install
run: npm install
working-directory: ./charts/kubernetes-agent
- name: Cache .pnpm-store
uses: actions/[email protected]
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}

- uses: pnpm/[email protected]
with:
version: 8.15.2
run_install: true

- name: Install YQ
uses: dcarbone/[email protected]
Expand All @@ -35,7 +40,6 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
cwd: ./charts/kubernetes-agent
commit: 'Version Kubernetes Agent Chart'
title: 'Version Kubernetes Agent Chart'
createGitHubReleases: false
Expand All @@ -44,15 +48,14 @@ jobs:

- name: 'Update version and commit Chart.yaml'
run: |
cd ./charts/kubernetes-agent
version=$(jq -r .version package.json)
version="$version" yq -i '.version = strenv(version)' Chart.yaml
npm i --package-lock-only
version="$version" yq -i '.version = strenv(version)' charts/kubernetes-agent/Chart.yaml
pnpm i --lockfile-only
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add Chart.yaml
git add package-lock.json
git commit -m "Update Chart.yaml"
git add charts/kubernetes-agent/Chart.yaml
git add pnpm-lock.json
git commit -m "Update charts/kubernetes-agent/Chart.yaml"
git push --set-upstream origin changeset-release/main
if: steps.changesets.outputs.hasChangesets == 'true'

Expand Down
Loading

0 comments on commit 23a869b

Please sign in to comment.