Handle TCP connection errors properly when running on Node.js #228
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: | |
- "*" | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
publish-jsr: | |
name: Publish to JSR | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
- run: deno vendor mod.ts | |
- run: deno run -A https://esm.sh/gh/mtkruto/tools@4ca0c02076/pre_jsr.ts ${{ github.ref_name }} && git add -A && git -c user.name=CI -c user.email="" commit -am JSR | |
- run: deno publish | |
publish-npm: | |
name: Publish to npm | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: MTKruto | |
- uses: denoland/setup-deno@v1 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
registry-url: https://registry.npmjs.org | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Transform and Publish | |
run: | | |
cd MTKruto | |
echo "<https://github.com/MTKruto/MTKruto>" > README.md | |
deno run -A https://raw.githubusercontent.com/MTKruto/npm/main/transform_browser.ts ${{ github.ref_name }} ./mod.ts | |
cd dist | |
npm publish --access public | |
cd .. | |
deno run -A https://raw.githubusercontent.com/MTKruto/npm/main/transform_node.ts ${{ github.ref_name }} ./mod.ts | |
cd dist | |
npm publish --access public | |
env: | |
__TYPE_MAP: 1 | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
create-release: | |
name: Create Release | |
needs: publish-npm | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: true | |
generate_release_notes: true | |
- uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.PAT_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: "MTKruto", | |
repo: "website", | |
workflow_id: "doc.yml", | |
ref: "main", | |
}); |