mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-01-09 13:36:47 -06:00
Merge pull request #41 from aleleba/PR-257071
PR-257071: updating packages and using only one workflow in github actions.
This commit is contained in:
commit
fe8e2e5073
60
.github/workflows/main-workflow.yml
vendored
Normal file
60
.github/workflows/main-workflow.yml
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# This file contains the main workflow for the GitHub Actions CI/CD pipeline for a Node.js TypeScript GraphQL server project.
|
||||||
|
# Name of the workflow
|
||||||
|
name: Main Workflow
|
||||||
|
|
||||||
|
# Define the event that triggers the workflow
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: ['*']
|
||||||
|
|
||||||
|
# Define the jobs that will run in the workflow
|
||||||
|
jobs:
|
||||||
|
# Job to run tests
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [16.x]
|
||||||
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Use Node.js 16
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
cache: 'npm'
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
|
- run: npm ci --legacy-peer-deps
|
||||||
|
- run: npm test
|
||||||
|
|
||||||
|
# Job to build the package
|
||||||
|
test-build-package:
|
||||||
|
if: github.ref != 'refs/heads/master'
|
||||||
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
|
- run: npm ci --legacy-peer-deps
|
||||||
|
- run: npm run build
|
||||||
|
|
||||||
|
# Job to publish the package to npm
|
||||||
|
publish-npm:
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
|
- run: npm ci --legacy-peer-deps
|
||||||
|
- run: npm publish --access=public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
30
.github/workflows/npm-publish.yml
vendored
30
.github/workflows/npm-publish.yml
vendored
@ -1,30 +0,0 @@
|
|||||||
name: NPM testing and publish package
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
registry-url: https://registry.npmjs.org/
|
|
||||||
- run: npm ci --legacy-peer-deps
|
|
||||||
- run: npm test
|
|
||||||
|
|
||||||
publish-npm:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
registry-url: https://registry.npmjs.org/
|
|
||||||
- run: npm ci --legacy-peer-deps
|
|
||||||
- run: npm publish --access=public
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
33
.github/workflows/npm-test.yml
vendored
33
.github/workflows/npm-test.yml
vendored
@ -1,33 +0,0 @@
|
|||||||
name: Testing package
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: ['*']
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [16.x]
|
|
||||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Use Node.js 16
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
cache: 'npm'
|
|
||||||
registry-url: https://registry.npmjs.org/
|
|
||||||
- run: npm ci --legacy-peer-deps
|
|
||||||
- run: npm test
|
|
||||||
test-build-package:
|
|
||||||
needs: test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
registry-url: https://registry.npmjs.org/
|
|
||||||
- run: npm ci --legacy-peer-deps
|
|
||||||
- run: npm run build
|
|
1236
package-lock.json
generated
1236
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@aleleba/create-node-ts-graphql-server",
|
"name": "@aleleba/create-node-ts-graphql-server",
|
||||||
"version": "1.5.9",
|
"version": "1.5.10",
|
||||||
"description": "Node with Typescript and GraphQL Server",
|
"description": "Node with Typescript and GraphQL Server",
|
||||||
"bin": "./bin/cli.js",
|
"bin": "./bin/cli.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
@ -53,9 +53,9 @@
|
|||||||
"ws": "^8.14.2"
|
"ws": "^8.14.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.23.2",
|
"@babel/core": "^7.23.3",
|
||||||
"@babel/preset-env": "^7.23.2",
|
"@babel/preset-env": "^7.23.3",
|
||||||
"@babel/preset-typescript": "^7.23.2",
|
"@babel/preset-typescript": "^7.23.3",
|
||||||
"@babel/register": "^7.22.15",
|
"@babel/register": "^7.22.15",
|
||||||
"@types/body-parser": "^1.19.5",
|
"@types/body-parser": "^1.19.5",
|
||||||
"@types/cookie-parser": "^1.4.6",
|
"@types/cookie-parser": "^1.4.6",
|
||||||
|
Loading…
Reference in New Issue
Block a user