Skip to content

Commit

Permalink
test npm setup
Browse files Browse the repository at this point in the history
  • Loading branch information
SpliiT committed Jan 16, 2024
1 parent 20a3579 commit 4883f3f
Show file tree
Hide file tree
Showing 5 changed files with 595 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Package to npmjs
on:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion generate_schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function return_json_schema(directoryPath, folder_path) {

const jsonDataStructure = return_json_schema(directoryPath, "ogw_back");
console.log("jsonDataStructure", jsonDataStructure);
const outputFile = path.join(directoryPath, "schemas.json");
const outputFile = path.join("./", "schemas.json");
fs.writeFileSync(outputFile, JSON.stringify(jsonDataStructure, null, 2));

console.log("Fichier JSON créé avec succès :", outputFile);
Loading

0 comments on commit 4883f3f

Please sign in to comment.