diff --git a/.changeset/proud-comics-heal.md b/.changeset/proud-comics-heal.md deleted file mode 100644 index 695fccbc4..000000000 --- a/.changeset/proud-comics-heal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"fdm-core": patch ---- - -Fix building by updating `vite-plugin-dts` diff --git a/.github/workflows/deploy-docs-test.yml b/.github/workflows/deploy-docs-test.yml index 902ec6e71..3f7079c63 100644 --- a/.github/workflows/deploy-docs-test.yml +++ b/.github/workflows/deploy-docs-test.yml @@ -6,6 +6,8 @@ defaults: on: pull_request: + paths: + - 'fdm-docs/**' branches: - main # Review gh actions docs if you want to further define triggers, paths, etc @@ -20,6 +22,13 @@ jobs: node-version: [20] steps: - uses: actions/checkout@v4 + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- - name: Install pnpm uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 91f9822b7..35b4dde25 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -6,6 +6,8 @@ defaults: on: push: + paths: + - 'fdm-docs/**' branches: - main # Review gh actions docs if you want to further define triggers, paths, etc @@ -20,6 +22,13 @@ jobs: node-version: [20] steps: - uses: actions/checkout@v4 + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- - name: Install pnpm uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/prerelease-fdm-core.yml b/.github/workflows/prerelease-fdm-core.yml new file mode 100644 index 000000000..46039533b --- /dev/null +++ b/.github/workflows/prerelease-fdm-core.yml @@ -0,0 +1,65 @@ +name: Prerelease fdm-core to GitHub Packages + +defaults: + run: + working-directory: ./fdm-core + +on: + pull_request: + paths: + - 'fdm-core/**' + branches: + - main + push: + paths: + - 'fdm-core/**' + branches: + - main + +jobs: + prerelease: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9.12.2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://npm.pkg.github.com' + cache: 'pnpm' + - name: Install dependencies + run: pnpm install --frozen-lockfile --filter fdm-core + - name: get-npm-version + id: package-version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + with: + path: fdm-core + - name: Create a prerelease version from PR + if: github.head_ref != 'main' + run: pnpm version ${{ steps.package-version.outputs.current-version}}-${{ github.head_ref }}.${{ github.sha }} --no-git-tag-version + - name: Create a prerelease version from main + if: github.head_ref == 'main' + run: pnpm version ${{ steps.package-version.outputs.current-version}}-${{ github.sha }} --no-git-tag-version + # - name: Run tests + # run: pnpm test + - name: Publish the package + run: pnpm publish --tag ${{ github.head_ref }} --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/fdm-calculator/CHANGELOG.md b/fdm-calculator/CHANGELOG.md new file mode 100644 index 000000000..7999c41c6 --- /dev/null +++ b/fdm-calculator/CHANGELOG.md @@ -0,0 +1,9 @@ +# fdm-calculator + +## 0.0.1 + +### Patch Changes + +- Updated dependencies [6f6b1c4] +- Updated dependencies [1750661] + - fdm-core@0.3.1 diff --git a/fdm-calculator/package.json b/fdm-calculator/package.json index 0d8ef2c9c..d446a84b1 100644 --- a/fdm-calculator/package.json +++ b/fdm-calculator/package.json @@ -1,7 +1,7 @@ { "name": "fdm-calculator", "private": true, - "version": "0.0.0", + "version": "0.0.1", "description": "Calculate various insights based on the Farm Data Model", "license": "MIT", "homepage": "https://github.com/SvenVw/fdm", diff --git a/fdm-core/CHANGELOG.md b/fdm-core/CHANGELOG.md index 5ad100e23..669787753 100644 --- a/fdm-core/CHANGELOG.md +++ b/fdm-core/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog fdm-core +## 0.3.1 + +### Patch Changes + +- 6f6b1c4: Fix building by updating `vite-plugin-dts` +- 1750661: Add GitHub Action to publish dev version of fdm-core to GitHub Packages + ## 0.3.0 ### Minor Changes diff --git a/fdm-core/package.json b/fdm-core/package.json index c418329e2..1d57f965c 100644 --- a/fdm-core/package.json +++ b/fdm-core/package.json @@ -1,10 +1,14 @@ { - "name": "fdm-core", - "private": true, - "version": "0.3.0", + "name": "@svenvw/fdm-core", + "private": false, + "version": "0.3.1", "description": "Interface for the Farm Data Model", "license": "MIT", - "homepage": "https://github.com/SvenVw/fdm", + "homepage": "https://svenvw.github.io/fdm/", + "repository": { + "type": "git", + "url": "git+https://github.com/SvenVw/fdm.git" + }, "bugs": "https://github.com/SvenVw/fdm/issues/new", "author": { "name": "Sven Verweij", @@ -70,6 +74,9 @@ "postgres": "^3.4.4" }, "packageManager": "pnpm@9.12.2", + "publishConfig": { + "registry": "https://npm.pkg.github.com" + }, "pnpm": { "packageExtensions": { "vite-plugin-dts": { @@ -87,4 +94,4 @@ } } } -} +} \ No newline at end of file diff --git a/fdm-data/CHANGELOG.md b/fdm-data/CHANGELOG.md index 8071bd956..f1b188350 100644 --- a/fdm-data/CHANGELOG.md +++ b/fdm-data/CHANGELOG.md @@ -1,5 +1,13 @@ # fdm-data +## 0.1.1 + +### Patch Changes + +- Updated dependencies [6f6b1c4] +- Updated dependencies [1750661] + - fdm-core@0.3.1 + ## 0.1.0 ### Minor Changes diff --git a/fdm-data/package.json b/fdm-data/package.json index 9e705e487..d1464affb 100644 --- a/fdm-data/package.json +++ b/fdm-data/package.json @@ -1,7 +1,7 @@ { "name": "fdm-data", "private": true, - "version": "0.1.0", + "version": "0.1.1", "description": "Extend Farm Data Model with catalogue data", "license": "MIT", "homepage": "https://github.com/SvenVw/fdm", diff --git a/fdm-docs/CHANGELOG.md b/fdm-docs/CHANGELOG.md index 86a2dc616..e95a1e5c9 100644 --- a/fdm-docs/CHANGELOG.md +++ b/fdm-docs/CHANGELOG.md @@ -1,5 +1,11 @@ # fdm-docs +## 0.1.2 + +### Patch Changes + +- b357b4c: Trigger test and publish for fdm-docs only if change is made in fdm-docs + ## 0.1.1 ### Patch Changes diff --git a/fdm-docs/package.json b/fdm-docs/package.json index f2b6641a2..d6e9c8dd2 100644 --- a/fdm-docs/package.json +++ b/fdm-docs/package.json @@ -1,6 +1,6 @@ { "name": "fdm-docs", - "version": "0.1.1", + "version": "0.1.2", "private": true, "scripts": { "docusaurus": "docusaurus",