Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.
Open
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
102 changes: 4 additions & 98 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
DENO_DIR: .deno

jobs:
prepare:
run:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
./node_modules
Expand All @@ -61,117 +61,23 @@ jobs:
- name: Deno Info
run: npx deno-bin info

- name: Prepare workspace
run: |
tar czf /tmp/workspace.tar.gz .

- uses: actions/upload-artifact@v4
with:
name: workspace
path: /tmp/workspace.tar.gz

lint:
runs-on: ubuntu-latest
needs: prepare

steps:
- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: '14.19.3'

- uses: actions/download-artifact@v4
with:
name: workspace
path: /tmp

- name: Decompress workspace
run: |
tar xzf /tmp/workspace.tar.gz .

- name: Lint TypeScript Code
run: npm run lint

test:
runs-on: ubuntu-latest
needs: build

steps:
- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: '14.19.3'

- uses: actions/download-artifact@v4
with:
name: workspace
path: /tmp

- name: Decompress workspace
run: |
tar xzf /tmp/workspace.tar.gz .

- name: Test TypeScript Code
run: npm run test

build:
runs-on: ubuntu-latest
needs: lint

steps:
- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: '14.19.3'

- uses: actions/download-artifact@v4
with:
name: workspace
path: /tmp

- name: Decompress workspace
run: |
tar xzf /tmp/workspace.tar.gz .

- name: Compile TypeScript into JavaScript
run: npm run compile

- name: Prepare workspace
run: |
tar czf /tmp/workspace.tar.gz .

- uses: actions/upload-artifact@v4
with:
name: workspace
path: /tmp/workspace.tar.gz
overwrite: true

publish:
runs-on: ubuntu-latest
if: github.event_name == 'release' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
needs: test

steps:
- name: Use Node.js 14.19.3
uses: actions/setup-node@v2
with:
node-version: '14.19.3'

- uses: actions/download-artifact@v4
with:
name: workspace
path: /tmp

- name: Decompress workspace
run: |
tar xzf /tmp/workspace.tar.gz .

- name: Authenticate with registry
if: github.event_name == 'release' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc

- name: Publish package
if: github.event_name == 'release' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
run: |
if [[ '${{ github.event_name }}' = 'release' ]]; then
npm publish --tag latest
Expand Down
Loading