Skip to content

Merge pull request #2 from cristopher1/development #3

Merge pull request #2 from cristopher1/development

Merge pull request #2 from cristopher1/development #3

Workflow file for this run

# Workflow to use continuos delivery
name: CD
on:
push:
tags:
- v*
jobs:
test_and_build:
name: Test and build the distributable generator-koa2-api-generator
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: audit
run: npm audit
- name: run quality check
run: npm run quality-check
- name: build the dist folder
run: npm run build
- name: save artifact
uses: actions/upload-artifact@v4
with:
name: distributable-generator-koa2-api-generator
path: |
dist
LICENSE
README.md
package.json
retention-days: 1
release:
name: Create new release
runs-on: ubuntu-latest
needs: test_and_build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: create a new release
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
body_path: RELEASE_NOTES.md
publish:
name: publish generator-koa2-api-generator package
runs-on: ubuntu-latest
needs: release
environment: publish
steps:
- name: download generator-koa2-api-generator distribuible
uses: actions/download-artifact@v4
with:
name: distributable-generator-koa2-api-generator
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: publish generator-koa2-api-generator en npm
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}