Skip to content

Commit

Permalink
Merge pull request #1 from SFTtech/milo/python-nx-integration
Browse files Browse the repository at this point in the history
feat(other): add nx plugin for python integration and setup python re…
  • Loading branch information
mikonse authored Jun 25, 2024
2 parents 211eb65 + b9fc2be commit 7f96e7a
Show file tree
Hide file tree
Showing 33 changed files with 1,688 additions and 45 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NX_ISOLATE_PLUGINS=true
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish
on:
push:
tags: ["*-*.*.*"]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Nodejs
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: package-lock.json

- name: Install node dependencies
run: npm ci

- name: Set up Python with PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.11"

- name: Install Python dependencies
run: pdm sync -d

- name: Publish
run: npx nx release publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
NPM_CONFIG_PROVENANCE: true
PDM_PUBLISH_USERNAME: __token__
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_ACCESS_TOKEN }}
31 changes: 23 additions & 8 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,13 @@
}
},
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
"plugin": "@nx/eslint/plugin"
},
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test"
}
"plugin": "@nx/jest/plugin"
},
{
"plugin": "@sftkit/nx-python"
}
],
"generators": {
Expand All @@ -57,5 +54,23 @@
"unitTestRunner": "jest"
}
}
},
"release": {
"releaseTagPattern": "{project}-{version}",
"projectsRelationship": "independent",
"changelog": {
"projectChangelogs": true
},
"groups": {
"web": {
"projects": ["web/*"]
},
"sftkit": {
"projects": ["sftkit"],
"git": {
"commitMessage": "chore(release): {project} {version}"
}
}
}
}
}
Loading

0 comments on commit 7f96e7a

Please sign in to comment.