From 6d10462bc2f7c3fe204d37375627ebbd572b7e45 Mon Sep 17 00:00:00 2001 From: sakulstra Date: Mon, 5 Feb 2024 09:40:37 +0100 Subject: [PATCH 1/4] fix: remove biome install --- .github/workflows/actions.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 3c7b1d6..19d64dc 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -6,7 +6,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 - - uses: biomejs/setup-biome@v1 - name: Install dependencies run: bun install - name: Lint check From c6a0bf074bf6c3b03087e720accf56a67ef1dd2b Mon Sep 17 00:00:00 2001 From: sakulstra Date: Mon, 5 Feb 2024 09:43:57 +0100 Subject: [PATCH 2/4] fix: split Lint and Build --- .github/workflows/{actions.yaml => test.yaml} | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) rename .github/workflows/{actions.yaml => test.yaml} (62%) diff --git a/.github/workflows/actions.yaml b/.github/workflows/test.yaml similarity index 62% rename from .github/workflows/actions.yaml rename to .github/workflows/test.yaml index 19d64dc..2737196 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,14 @@ -name: CI +name: Test and lint on: [push] jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + - uses: biomejs/setup-biome@v1 + - name: Lint check + run: biome ci . Lint: runs-on: ubuntu-latest steps: @@ -8,7 +16,5 @@ jobs: - uses: oven-sh/setup-bun@v1 - name: Install dependencies run: bun install - - name: Lint check - run: biome ci . - name: Build run: bun run build From 5800bd8ab79590516977a91c6efc7252c07aff35 Mon Sep 17 00:00:00 2001 From: sakulstra Date: Mon, 5 Feb 2024 09:46:45 +0100 Subject: [PATCH 3/4] fix: alter runner conditions --- .github/workflows/test.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2737196..ef599b9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,7 +1,17 @@ name: Test and lint -on: [push] + +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +on: + pull_request: + push: + branches: + - master + jobs: - Build: + Lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -9,7 +19,7 @@ jobs: - uses: biomejs/setup-biome@v1 - name: Lint check run: biome ci . - Lint: + Build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 00bf9428e3533008364c105ce09ddf0c2ed4736b Mon Sep 17 00:00:00 2001 From: sakulstra Date: Mon, 5 Feb 2024 10:10:57 +0100 Subject: [PATCH 4/4] feat: add publish job --- .github/workflows/release-please.yaml | 40 ++++++++++++++ bun.lockb | Bin 15473 -> 16945 bytes package.json | 72 +++++++++++++------------- 3 files changed, 77 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/release-please.yaml diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml new file mode 100644 index 0000000..f404657 --- /dev/null +++ b/.github/workflows/release-please.yaml @@ -0,0 +1,40 @@ +name: Release + +on: + push: + branches: + - master + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + outputs: + releaseCreated: ${{ steps.release.outputs.release_created }} + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: node + package-name: catapulta-verify + pull-request-header: "I have created a release" + + release-node: + runs-on: ubuntu-latest + if: ${{ needs.release-please.outputs.releaseCreated }} + needs: + - release-please + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + - name: Install dependencies + run: bun install + - name: Build + run: bun run build + - name: Publish + run: npm publish --access=public + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 8b12631b7c8d6014e86fd35f4bfb777d207665a3..a1a40da22972170466c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V~Ks+)-qZ}+g7HSVVv96RkTXBtv6`-^EAPK{A-EL{G7xD%Qv9<*reyv9tMET|40E}0zs43Mj)J*{(_u$%nT7}34<3sv zFI3r<4m)KF$wBYb6P7FCq7w&3`ZwI#_1@;v&QD2qYw~l?A8HFA52{q~Rd%+xd9d1Y z^23*iw#JsZq1F4>*H`=8ujXt$xvr3g6Bqqn58CSNKX?u8W@LEg3feJqre$WPejsR zjz`k%sE{AMiAPdk*`(p6DNlt^X_2Le<5|%5>YI&98~s)~Eh1)<)nvvDUxQ7j^Z8F+ ztX26vc^vdvq;g+Jj`S5e%>}P+#;}rY=VkHIS*1b?= z-7TxdHlqFCY)hLY4H8dW>Q>0xZ2qCOkR=xA&s9ORO#Hq)$ diff --git a/package.json b/package.json index 9499e41..2b2cf5c 100644 --- a/package.json +++ b/package.json @@ -1,36 +1,38 @@ { - "name": "catapulta-verify", - "version": "0.1.13", - "author": "@kartojal (https://catapulta.sh/)", - "repository": "github:catapulta-sh/catapulta-verify", - "main": "./out/index.mjs", - "devDependencies": { - "@biomejs/biome": "1.4.1", - "@types/chalk": "^2.2.0", - "bun-types": "latest", - "chalk": "^5.3.0", - "dotenv": "^16.3.1", - "ts-command-line-args": "^2.5.1" - }, - "peerDependencies": { - "typescript": "^5.0.0" - }, - "bin": { - "catapulta-verify": "./out/index.mjs" - }, - "bugs": { - "url": "https://github.com/catapulta-sh/catapulta-verify/issues", - "email": "david@web3ops.co" - }, - "files": [ - "out/index.mjs" - ], - "homepage": "https://github.com/catapulta-sh/catapulta-verify#readme", - "license": "MIT", - "scripts": { - "build": "bun build ./src/index.ts --outfile=out/index.mjs --target node", - "postbuild": "bunx rexreplace '^(#!.+\\n)?' '$1import { createRequire as createImportMetaRequire } from \"module\"; import.meta.require ||= (id) => createImportMetaRequire(import.meta.url)(id);\\n' -GM out/index.mjs", - "lint:fix": "bunx @biomejs/biome check ./ --apply", - "lint": "bunx @biomejs/biome check ./" - } -} \ No newline at end of file + "name": "catapulta-verify", + "version": "0.1.13", + "author": "@kartojal (https://catapulta.sh/)", + "repository": "github:catapulta-sh/catapulta-verify", + "main": "./out/index.mjs", + "private": false, + "publishConfig": { + "access": "public" + }, + "files": ["out/index.mjs"], + "devDependencies": { + "@biomejs/biome": "1.4.1", + "@types/chalk": "^2.2.0", + "bun-types": "latest", + "chalk": "^5.3.0", + "dotenv": "^16.3.1", + "ts-command-line-args": "^2.5.1" + }, + "peerDependencies": { + "typescript": "^5.0.0" + }, + "bin": { + "catapulta-verify": "./out/index.mjs" + }, + "bugs": { + "url": "https://github.com/catapulta-sh/catapulta-verify/issues", + "email": "david@web3ops.co" + }, + "homepage": "https://github.com/catapulta-sh/catapulta-verify#readme", + "license": "MIT", + "scripts": { + "build": "bun build ./src/index.ts --outfile=out/index.mjs --target node", + "postbuild": "bunx rexreplace '^(#!.+\\n)?' '$1import { createRequire as createImportMetaRequire } from \"module\"; import.meta.require ||= (id) => createImportMetaRequire(import.meta.url)(id);\\n' -GM out/index.mjs", + "lint:fix": "bunx @biomejs/biome check ./ --apply", + "lint": "bunx @biomejs/biome check ./" + } +}