Unverified Commit 91306811 authored by Hong Minhee's avatar Hong Minhee
Browse files

Prepare to migrate to monorepo

[ci skip]
parent c73d0d82
Loading
Loading
Loading
Loading

.github/FUNDING.yaml

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
open_collective: fedify
github: dahlia

.github/workflows/main.yaml

deleted100644 → 0
+0 −101
Original line number Diff line number Diff line
name: main
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    permissions:
      checks: write
      pull-requests: write
    services:
      postgres:
        image: postgres
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_DB: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
        - 5432:5432
    env:
      DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
    steps:
    - uses: actions/checkout@v4
    - uses: denoland/setup-deno@v1
      with:
        deno-version: v2.x
    - uses: pnpm/action-setup@v4
      with:
        version: 10
    - uses: actions/setup-node@v4
      with:
        node-version: lts/*
        cache: pnpm
    - uses: oven-sh/setup-bun@v1
      with:
        bun-version: latest
    - run: deno task test --junit-path=.test-report.xml
    - uses: EnricoMi/publish-unit-test-result-action@v2
      if: always()
      with:
        files: .test-report.xml
    - run: deno task check
    - run: pnpm install
    - run: pnpm test
    - run: pnpm test:bun

  publish:
    if: github.event_name == 'push'
    needs: [test]
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
    - uses: actions/checkout@v4
    - uses: denoland/setup-deno@v1
      with:
        deno-version: v2.x
    - uses: pnpm/action-setup@v4
      with:
        version: 10
    - uses: actions/setup-node@v4
      with:
        node-version: lts/*
        cache: pnpm
    - if: github.ref_type == 'branch'
      run: |
        set -ex
        jq \
          --arg build "$GITHUB_RUN_NUMBER" \
          --arg commit "${GITHUB_SHA::8}" \
          '.version = .version + "-dev." + $build + "+" + $commit' \
          deno.json > deno.json.tmp
        mv deno.json.tmp deno.json
        jq \
          --arg build "$GITHUB_RUN_NUMBER" \
          '.version = .version + "-dev." + $build' \
          package.json > package.json.tmp
        mv package.json.tmp package.json
    - if: github.ref_type == 'tag'
      run: |
        set -ex
        [[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]]
        [[ "$(jq -r .version package.json)" = "$GITHUB_REF_NAME" ]]
    - run: |
        set -ex
        pnpm install
        pnpm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
        if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
          pnpm publish --provenance --access public --no-git-checks
        else
          pnpm publish --provenance --access public --no-git-checks --tag dev
        fi
      env:
        NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
        NPM_CONFIG_PROVENANCE: "true"
    - run: deno publish --allow-dirty

.gitignore

deleted100644 → 0
+0 −4
Original line number Diff line number Diff line
.dnt-import-map.json
dist/
node_modules/
npm/

.vscode/extensions.json

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
{
  "recommendations": [
    "denoland.vscode-deno",
    "streetsidesoftware.code-spell-checker"
  ]
}

.vscode/settings.json

deleted100644 → 0
+0 −33
Original line number Diff line number Diff line
{
  "deno.enable": true,
  "deno.unstable": [
    "temporal"
  ],
  "editor.detectIndentation": false,
  "editor.indentSize": 2,
  "editor.insertSpaces": true,
  "files.eol": "\n",
  "files.insertFinalNewline": true,
  "files.trimFinalNewlines": true,
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features",
    "editor.formatOnSave": true
  },
  "[jsonc]": {
    "editor.defaultFormatter": "vscode.json-language-features",
    "editor.formatOnSave": true
  },
  "[typescript]": {
    "editor.defaultFormatter": "denoland.vscode-deno",
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.sortImports": "always"
    }
  },
  "cSpell.words": [
    "fedify",
    "logtape",
    "unlisten",
    "UNLOGGED"
  ]
}
Loading