Skip to content

Commit

Permalink
Fix semantic release setup in the monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiPl01 committed Jul 26, 2024
1 parent 100e0c1 commit 64c1c57
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20

- name: 🔄 Generate Cache Key
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: 💾 Cache Dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: 'yarn'

- name: 📦 Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: 🎉 Release
working-directory: packages/reanimated-utils
run: yarn semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
1 change: 1 addition & 0 deletions template/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ example/*
**/babel.config.cjs
**/.eslintrc.cjs
**/dist
**/jest.setup.js
8 changes: 7 additions & 1 deletion template/packages/__library-name__/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@
"changelogFile": "CHANGELOG.md"
}
],
"@semantic-release/npm",
[
"@semantic-release/npm",
{
"pkgRoot": ".",
"tarballDir": "dist"
}
],
[
"@semantic-release/git",
{
Expand Down
6 changes: 3 additions & 3 deletions template/packages/__library-name__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
"scripts": {
"build": "yarn clean && bob build",
"clean": "../../scripts/clean.sh",
"postpack": "rm ./README.md",
"prepack": "bob build && cp ../../README.md ./README.md",
"test": "jest",
"typecheck": "tsc -p tsconfig.json --noEmit",
"prepack": "cp ../../README.md ./README.md",
"postpack": "rm ./README.md"
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"types": "dist/typescript/index.d.ts"
}
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2397,9 +2397,9 @@ __metadata:
linkType: hard

"globals@npm:^15.0.0":
version: 15.0.0
resolution: "globals@npm:15.0.0"
checksum: 10c0/b93e356a7bd4562d73a9defa95a0ff5e8a0b7726a4e2af16bd8ad019e14cd21d85e0a27b46e7e270d34e25df0bc0f9473ca21b47266c406c0e40973956085777
version: 15.8.0
resolution: "globals@npm:15.8.0"
checksum: 10c0/b96ec86e1244806920a80a1a7c4d64b68c55336887cfa1b52886927e0f9035133e4acd354fcda63b49e53df2089c41a11dd2b02281a6439a58cbc0d63ae083cb
languageName: node
linkType: hard

Expand Down

0 comments on commit 64c1c57

Please sign in to comment.