Skip to content

Commit 41f8e5c

Browse files
authored
chore: workspace config (#321)
* chore: workspace config * chore: monorepo setup * chore: workflows * chore: workflows * chore: renamed folder * chore: ts config * chore: version * chore: version * chore: turbo * chore: run dev * chore: release it config * chore: release it config * chore: updated dependencies * chore: changesets * chore: changesets * chore: turbo update * chore: workspcae * chore: workspace * chore: workspace * chore: workspace * chore: minor fixes * chore: minor fix * chore: lock * chore: lint staged * chore: husky * chore: release app * chore: removed workflow dispatch * chore: updated changeset
1 parent d11137b commit 41f8e5c

197 files changed

Lines changed: 2110 additions & 1120 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets).
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/neat-bars-sleep.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@repo/eslint-config': patch
3+
'@repo/tsconfig': patch
4+
'dotenv-diff': patch
5+
---
6+
7+
Updated dependencies and release scripts for all packages.

.github/workflows/build-test-lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- name: Install pnpm
2323
uses: pnpm/action-setup@v4
2424
with:
25-
version: 10
2625
run_install: false
2726

2827
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,57 @@
11
name: Release
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
57

6-
permissions:
7-
contents: write
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
89

910
jobs:
10-
check:
11-
runs-on: ubuntu-latest
12-
outputs:
13-
should_release: ${{ steps.check.outputs.should_release }}
14-
steps:
15-
- uses: actions/checkout@v6
16-
with:
17-
fetch-depth: 0
18-
19-
- name: Check if release is needed
20-
id: check
21-
run: |
22-
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
23-
if [ -z "$LAST_TAG" ]; then
24-
echo "should_release=true" >> $GITHUB_OUTPUT
25-
exit 0
26-
fi
27-
28-
COMMITS=$(git log ${LAST_TAG}..HEAD --oneline)
29-
if echo "$COMMITS" | grep -qE "^[a-f0-9]+ (feat|fix|perf|revert)(\\(.*\\))?(!)?:";
30-
then
31-
echo "should_release=true" >> $GITHUB_OUTPUT
32-
else
33-
echo "should_release=false" >> $GITHUB_OUTPUT
34-
fi
35-
3611
release:
37-
needs: check
38-
# Only run release job if a release is needed and prevent releases from forks
39-
if: needs.check.outputs.should_release == 'true' && github.repository == 'Chrilleweb/dotenv-diff'
12+
name: Release
13+
# Prevent releases from forks
14+
if: github.repository == 'Chrilleweb/dotenv-diff'
4015
runs-on: ubuntu-latest
4116
permissions:
42-
id-token: write
4317
contents: write
18+
pull-requests: write
19+
id-token: write
4420

4521
steps:
46-
- uses: actions/checkout@v6
22+
- name: Generate GitHub App token
23+
id: app-token
24+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859
4725
with:
48-
fetch-depth: 0 # fetch all history for tags
26+
app-id: ${{ secrets.APP_ID }}
27+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
4928

50-
- name: Configure git user
51-
run: |
52-
git config user.name "github-actions[bot]"
53-
git config user.email "github-actions[bot]@users.noreply.github.com"
29+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
30+
with:
31+
fetch-depth: 0
32+
token: ${{ steps.app-token.outputs.token }}
5433

55-
- uses: actions/setup-node@v6
34+
- name: Install pnpm
35+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
36+
37+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
5638
with:
5739
node-version: 24
40+
registry-url: 'https://registry.npmjs.org'
41+
42+
- name: Install dependencies
43+
run: pnpm install --frozen-lockfile
5844

59-
- run: npm install
45+
- name: Build packages
46+
run: pnpm build
6047

61-
- name: Run release-it
62-
run: npm run release -- --ci
48+
- name: Create Release Pull Request or Publish to npm
49+
id: changesets
50+
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf
51+
with:
52+
publish: pnpm release
53+
version: pnpm version
54+
commit: 'chore: release packages'
55+
title: 'chore: release packages'
6356
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

.github/workflows/test-coverage.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
ref: ${{ github.event.pull_request.head.sha }}
1919

2020
- uses: pnpm/action-setup@v4
21-
with:
22-
version: 9
2321

2422
- uses: actions/setup-node@v6
2523
with:

.release-it.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)