Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22a24c2
commit 5fd434b
Showing
5 changed files
with
637 additions
and
306 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
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 typescript@5.3.3 -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/github-action@v1.1.2 | ||
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/action-create-release-from-tag@v1.0.2 | ||
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 typescript@5.3.3 -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 }} |
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
Oops, something went wrong.