Merge pull request #4 from steve-lebleu/feature/extract-templates #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
name: Build package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: node-modules-${{ hashfiles('**/package-lock.json') }} | |
- name: Github checkout | |
uses: actions/checkout@v4 | |
- name: Setup node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.19.0' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install NPM dependencies | |
run: npm i [email protected] -g && npm i | |
- name: Compile Typescript files | |
run: tsc | |
- name: Execute units tests | |
run: npm run ci:coverage | |
- name: Publish to coveralls.io | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./reports/coverage/lcov.info | |
release: | |
name: Release on Github | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: node-modules-${{ hashfiles('**/package-lock.json') }} | |
- name: Github checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.19.0' | |
- name: Create release | |
uses: konfer-be/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
name: Publish on NPM | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: node-modules-${{ hashfiles('**/package-lock.json') }} | |
- name: Github checkout | |
uses: actions/checkout@v4 | |
- name: Setup node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.19.0' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install NPM dependencies | |
run: npm i [email protected] -g && npm i | |
- name: Compile Typescript files with declarations | |
run: tsc --declaration | |
- name: Delete unpackaged files | |
run: rm -rf ./.github && rm -rf ./src && rm -rf ./test && rm -f tsconfig.json && rm -f ROADMAP.md | |
- name: Publish package on NPM registery | |
run: npm ci & npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |