-
Notifications
You must be signed in to change notification settings - Fork 8
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
Showing
17 changed files
with
243 additions
and
232 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
38 changes: 27 additions & 11 deletions
38
.github/workflows/nodejs.yml → .github/workflows/deno.yml
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 |
---|---|---|
@@ -1,44 +1,60 @@ | ||
name: Node.js | ||
name: Deno | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
# Check if it works with current dependencies | ||
# Check if it works with current versions | ||
- cron: '42 2 * * 6' # weekly on Saturday 2:42 UTC | ||
|
||
jobs: | ||
denofmt-and-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
- uses: actions/checkout@v4 | ||
|
||
- run: deno lint | ||
- run: deno fmt --check | ||
|
||
test: | ||
name: Node.js | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
node-version: 'lts/*' | ||
deno-version: v1.x | ||
- uses: actions/checkout@v4 | ||
- run: npm install | ||
- run: npm test | ||
- run: npm pack | ||
|
||
publish: | ||
- run: deno cache source/*.ts | ||
- run: deno check source/*.ts | ||
- run: deno test | ||
|
||
npm: | ||
name: Publish on NPM | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
needs: test | ||
needs: [denofmt-and-lint, test] | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install | ||
- run: npm pack | ||
- run: npm publish | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_CONFIG_ACCESS: public | ||
NPM_CONFIG_PROVENANCE: true | ||
- name: Create GitHub release | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: softprops/action-gh-release@v1 |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/*-*.*.*.tgz | ||
coverage | ||
dist | ||
node_modules |
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,3 @@ | ||
{ | ||
"deno.enable": true | ||
} |
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,10 @@ | ||
{ | ||
"lock": false, | ||
"fmt": { | ||
"useTabs": true | ||
}, | ||
"exclude": [ | ||
"./dist/", | ||
"./node_modules/" | ||
] | ||
} |
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.