Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Deno instead NPM, TypeScript, Babel, SWC, ts-node... #2

Merged
merged 4 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions .babel/plugin-node-module-resolution.mjs

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/npm-publish.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish NPM package

on:
release:
types: [published]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Lint
run: |
deno task lint

- name: Unit tests
run: |
deno test

- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT

- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Build npm package
run: |
deno task build-npm ${{ github.event.release.tag_name }}

- name: npm publish
if: startsWith(github.ref, 'refs/tags/')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd npm && npm publish
19 changes: 5 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,15 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
node-version: 20

- name: Install dependencies
run: npm ci
deno-version: v1.x

- name: Lint
run: |
npm run type-check
deno task lint

- name: Unit tests
run: |
npm run test

- name: Package tests
working-directory: ./tests
run: |
npm run preparing
npm run test
deno test
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
node_modules
dist

# npm pack default output
krutoo-fetch-tools-0.0.0.tgz
# build artifacts
npm
Loading
Loading