Skip to content

Commit

Permalink
fix: run semantic release from repository root
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaschiang committed Nov 23, 2024
1 parent 5b6c092 commit 34e1922
Show file tree
Hide file tree
Showing 7 changed files with 2,286 additions and 1,181 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ on:
- main
- '*.x'

defaults:
run:
working-directory: ./remix-ui

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
Expand All @@ -37,21 +33,15 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get package manager version
id: get-pnpm-version
run: echo "version=$(cat package.json | jq -r .packageManager | sed s/pnpm@//)" >> $GITHUB_OUTPUT

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ steps.get-pnpm-version.outputs.version }}

- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: remix-ui/package.json
cache-dependency-path: remix-ui/pnpm-lock.yaml
node-version-file: package.json
cache-dependency-path: pnpm-lock.yaml
cache: pnpm

- name: Download deps
Expand Down Expand Up @@ -84,21 +74,15 @@ jobs:
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}

- name: Get package manager version
id: get-pnpm-version
run: echo "version=$(cat package.json | jq -r .packageManager | sed s/pnpm@//)" >> $GITHUB_OUTPUT

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ steps.get-pnpm-version.outputs.version }}

- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: remix-ui/package.json
cache-dependency-path: remix-ui/pnpm-lock.yaml
node-version-file: package.json
cache-dependency-path: pnpm-lock.yaml
cache: pnpm

- name: Download deps
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
10 changes: 5 additions & 5 deletions remix-ui/.releaserc.json → .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
{
"replacements": [
{
"files": ["package.json"],
"files": ["remix-ui/package.json"],
"from": "\"version\": \".*\"",
"to": "\"version\": \"${nextRelease.version}\"",
"results": [
{
"file": "package.json",
"file": "remix-ui/package.json",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
Expand All @@ -29,12 +29,12 @@
"countMatches": true
},
{
"files": ["../data-collection/pyproject.toml"],
"files": ["data-collection/pyproject.toml"],
"from": "^version = \".*\"",
"to": "version = \"${nextRelease.version}\"",
"results": [
{
"file": "../data-collection/pyproject.toml",
"file": "data-collection/pyproject.toml",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
Expand All @@ -49,7 +49,7 @@
[
"@semantic-release/git",
{
"assets": ["package.json", "../data-collection/pyproject.toml", "../CHANGELOG.md"],
"assets": ["remix-ui/package.json", "data-collection/pyproject.toml", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version}"
}
]
Expand Down
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "dolce",
"version": "1.68.3",
"private": true,
"description": "",
"scripts": {},
"devDependencies": {
"@google/semantic-release-replace-plugin": "^1.2.7",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"semantic-release": "^23.0.2"
},
"keywords": [],
"license": "AGPL-3.0-or-later",
"engines": {
"node": "22"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 34e1922

Please sign in to comment.