diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 0000000..6c2be0e --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,43 @@ +name: Publish + +on: + push: + branches: + - main + - release + workflow_dispatch: + +concurrency: release + +permissions: + contents: write + issues: read + +jobs: + ci: + name: Continuous Integration + uses: ./.github/workflows/ci.yaml + + release: + name: Release + needs: ci + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Install dependencies and build + run: npm ci && npm run build + + - name: 'Semantic release' + run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml deleted file mode 100644 index fba2fc6..0000000 --- a/.github/workflows/cd.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Publish - -on: - push: - branches: - - main - - release - workflow_dispatch: - -concurrency: release - -permissions: - contents: write - issues: read - -jobs: - ci: - name: Continuous Integration - uses: ./.github/workflows/ci.yml - - build: - name: Build - uses: makerxstudio/shared-config/.github/workflows/node-build-zip.yml@main - needs: - - ci - - check_docs - with: - node-version: 20.x - build-path: dist - artifact-name: package - - release: - name: Release - needs: build - runs-on: ubuntu-latest - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - # semantic-release needs node 20 - - name: Use Node.js 20.x - uses: actions/setup-node@v3 - with: - node-version: 20.x - - - name: Download built package - uses: actions/download-artifact@v4 - with: - name: package - path: artifacts - - - name: Unzip package - shell: bash - run: | - mkdir -p dist - unzip -q "artifacts/package.zip" -d dist - - - name: Install dependencies to get semantic release components and plugins - run: npm ci --ignore-scripts - - - name: 'Semantic release' - run: npx semantic-release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yaml similarity index 96% rename from .github/workflows/ci.yml rename to .github/workflows/ci.yaml index bee42f2..e461ad8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ name: Run Tests on: push: - branches: + branches-ignore: - main pull_request: workflow_call: diff --git a/package-lock.json b/package-lock.json index a543126..443987a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "avm-debug-adapter", - "version": "0.3.0", + "name": "algokit-avm-debugger", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "avm-debug-adapter", - "version": "0.3.0", + "name": "algokit-avm-debugger", + "version": "0.1.0", "license": "MIT", "dependencies": { "@vscode/debugadapter": "^1.64.0", @@ -14,7 +14,7 @@ "await-notify": "^1.0.1" }, "bin": { - "avm-debug-adapter": "out/src/cli.js" + "algokit-avm-debugger": "dist/src/cli.js" }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2", diff --git a/package.json b/package.json index d3fd4b8..bb89046 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "avm-debug-adapter", - "version": "0.3.0", + "name": "algokit-avm-debugger", + "version": "0.1.0", "description": "Algorand AVM transaction and smart contract debugger using the Debugger Adapter Protocol", "author": { - "name": "Algorand, llc" + "name": "Algorand Foundation" }, "license": "MIT", "engines": { @@ -11,46 +11,47 @@ }, "repository": { "type": "git", - "url": "https://github.com/algorand/avm-debugger.git" + "url": "https://github.com/algorandfoundation/algokit-avm-debugger.git" }, "bugs": { - "url": "https://github.com/algorand/avm-debugger/issues" + "url": "https://github.com/algorandfoundation/algokit-avm-debugger/issues" }, - "main": "out/src/common/index.js", - "types": "out/src/common/index.d.ts", + "main": "dist/src/common/index.js", + "types": "dist/src/common/index.d.ts", "typesVersions": { "*": { ".": [ - "out/src/common/index.d.ts" + "dist/src/common/index.d.ts" ], "*": [ - "out/src/common/index.d.ts" + "dist/src/common/index.d.ts" ], "node": [ - "out/src/node/index.d.ts" + "dist/src/node/index.d.ts" ] } }, "exports": { ".": { - "types": "./out/src/common/index.d.ts", - "default": "./out/src/common/index.js" + "types": "./dist/src/common/index.d.ts", + "default": "./dist/src/common/index.js" }, "./node": { - "types": "./out/src/node/index.d.ts", - "default": "./out/src/node/index.js" + "types": "./dist/src/node/index.d.ts", + "default": "./dist/src/node/index.js" } }, "bin": { - "avm-debug-adapter": "./out/src/cli.js" + "algokit-avm-debugger": "./dist/src/cli.js" }, "files": [ - "out/src", + "dist/src", "src" ], "scripts": { "prepare": "npm run compile", - "compile": "shx rm -rf out && tsc -p ./", + "compile": "shx rm -rf dist && tsc -p ./", + "build": "npm run compile && npm pack", "lint": "eslint src --ext ts", "typecheck": "tsc -p tsconfig.json --noEmit", "check-format": "prettier . --check", @@ -100,11 +101,7 @@ "release": { "branches": [ { - "name": "main", - "prerelease": "beta" - }, - { - "name": "release" + "name": "main" } ], "plugins": [ diff --git a/tsconfig.json b/tsconfig.json index 652f0bd..dc62511 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "module": "commonjs", "target": "ES2020", - "outDir": "out", + "outDir": "dist", "lib": ["WebWorker", "ES2020"], "sourceMap": true, "declaration": true,