-
Notifications
You must be signed in to change notification settings - Fork 0
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
cd2d193
commit b84a9a3
Showing
2 changed files
with
101 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
job_lint: | ||
name: Lint | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout, Setup Node.js v${{ env.NODE_VERSION }} and Install dependencies | ||
uses: manferlo81/action-checkout-node-install@v0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
env: | ||
NODE_VERSION: 20.x | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
job_test_and_build: | ||
strategy: | ||
matrix: | ||
os: | ||
- name: Ubuntu | ||
image: ubuntu-latest | ||
node-version: | ||
- 18.x | ||
- 20.x | ||
|
||
name: Test and Build ( ${{ matrix.os.name }}, Node.js v${{ matrix.node-version }} ) | ||
|
||
runs-on: ${{ matrix.os.image }} | ||
needs: job_lint | ||
|
||
steps: | ||
- name: Checkout, Setup Node.js v${{ matrix.node-version }} and Install dependencies | ||
uses: manferlo81/action-checkout-node-install@v0 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Test | ||
run: npm test | ||
env: | ||
SKIP_COVERAGE: true | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
job_upload_coverage: | ||
name: Upload Coverage | ||
|
||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && github.ref_type == 'branch' | ||
needs: job_test_and_build | ||
|
||
steps: | ||
- run: echo "not implemented yet..." | ||
|
||
job_create_release: | ||
name: Create GitHub Release | ||
|
||
runs-on: ubuntu-latest | ||
if: github.ref_type == 'tag' | ||
needs: job_test_and_build | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout, Setup Node.js v20.x and Install dependencies | ||
uses: manferlo81/action-checkout-node-install@v0 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Create Tarball | ||
run: npm pack | ||
|
||
- name: Create release | ||
uses: manferlo81/action-auto-release@v0 | ||
with: | ||
files: map-number-*.tgz | ||
|
||
job_publish_to_npm: | ||
name: Publish Package to npm Registry | ||
|
||
runs-on: ubuntu-latest | ||
if: github.ref_type == 'tag' | ||
needs: job_test_and_build | ||
|
||
steps: | ||
- run: echo "not implemented yet..." |
This file was deleted.
Oops, something went wrong.