From 01c1c3bc8a348dfbd21e121336c72a3cc3ff5a00 Mon Sep 17 00:00:00 2001 From: chaddyc Date: Mon, 7 Apr 2025 13:36:46 +0200 Subject: [PATCH 1/5] test - pkg publish --- .github/actions/setup-bot/action.yml | 11 +++++++++++ .github/workflows/build.yml | 7 ++++++- .github/workflows/publish.yml | 2 +- package.json | 1 - 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .github/actions/setup-bot/action.yml diff --git a/.github/actions/setup-bot/action.yml b/.github/actions/setup-bot/action.yml new file mode 100644 index 0000000..33031f8 --- /dev/null +++ b/.github/actions/setup-bot/action.yml @@ -0,0 +1,11 @@ +name: "Setup Bot" +description: "Steps to setup bot" + +runs: + using: "composite" + steps: + - name: Setup package access + shell: bash + run: | + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + echo "$SSH_IKHOKHA_BOT" | tr -d '\r' | DISPLAY=None ssh-add - >/dev/null \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c50a1e7..fb3af47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,8 @@ on: branches: [main] env: + SSH_IKHOKHA_BOT: ${{ secrets.IKHOKHA_BOT_SSH }} + SSH_AUTH_SOCK: /tmp/ssh_agent.sock NODE_VERSION: 18.x GITHUB_PACKAGE_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN}} NPM_ACCESS_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN }} @@ -16,6 +18,9 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup pkg access + uses: ./.github/actions/setup-bot + - name: Setup node uses: actions/setup-node@v3 with: @@ -38,4 +43,4 @@ jobs: run: yarn typecheck - name: Dry-run publish package - run: npm publish --dry-run --access restricted \ No newline at end of file + run: npm publish --dry-run \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ce62f05..6f0266a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,4 +38,4 @@ jobs: run: yarn typecheck - name: Publish npm pkg - run: npm publish --access restricted \ No newline at end of file + run: npm publish \ No newline at end of file diff --git a/package.json b/package.json index 50e1e0b..4e1f3f9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "@ikhokha/octet-buffer", "version": "1.0.1", "description": "Lightweight wrapper around Node Buffer, providing streaming read/write for uint8 to unit32", - "private": true, "author": "Simon Eumes ", "contributors": [ { From e5758975a23c418bd6f194eced8f4f3af55b38d0 Mon Sep 17 00:00:00 2001 From: chaddyc Date: Mon, 7 Apr 2025 13:41:04 +0200 Subject: [PATCH 2/5] test - pkg publish --- .github/actions/setup-bot/action.yml | 11 ----------- .github/workflows/build.yml | 7 +------ 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 .github/actions/setup-bot/action.yml diff --git a/.github/actions/setup-bot/action.yml b/.github/actions/setup-bot/action.yml deleted file mode 100644 index 33031f8..0000000 --- a/.github/actions/setup-bot/action.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: "Setup Bot" -description: "Steps to setup bot" - -runs: - using: "composite" - steps: - - name: Setup package access - shell: bash - run: | - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - echo "$SSH_IKHOKHA_BOT" | tr -d '\r' | DISPLAY=None ssh-add - >/dev/null \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb3af47..ee9e183 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,8 +5,6 @@ on: branches: [main] env: - SSH_IKHOKHA_BOT: ${{ secrets.IKHOKHA_BOT_SSH }} - SSH_AUTH_SOCK: /tmp/ssh_agent.sock NODE_VERSION: 18.x GITHUB_PACKAGE_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN}} NPM_ACCESS_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN }} @@ -18,9 +16,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup pkg access - uses: ./.github/actions/setup-bot - - name: Setup node uses: actions/setup-node@v3 with: @@ -43,4 +38,4 @@ jobs: run: yarn typecheck - name: Dry-run publish package - run: npm publish --dry-run \ No newline at end of file + run: npm publish --dry-run --access public \ No newline at end of file From b6b631dee10db9b023f9ace6dfbf373cc5e7d45b Mon Sep 17 00:00:00 2001 From: chaddyc Date: Mon, 7 Apr 2025 13:42:26 +0200 Subject: [PATCH 3/5] test - pkg publish --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 4e1f3f9..870cc1d 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "@ikhokha/octet-buffer", "version": "1.0.1", "description": "Lightweight wrapper around Node Buffer, providing streaming read/write for uint8 to unit32", + "private": false, "author": "Simon Eumes ", "contributors": [ { From 6fab9e0ffd3d174e12066e406302462c6a6e9f8e Mon Sep 17 00:00:00 2001 From: chaddyc Date: Mon, 7 Apr 2025 13:48:21 +0200 Subject: [PATCH 4/5] test - pkg publish --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee9e183..0e9c252 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,16 @@ jobs: run: cp ./.npmrc ~/.npmrc shell: bash + - name: Authenticate with npm adduser + run: | + echo "Logging in to GitHub Package Registry" + npm adduser < Date: Mon, 7 Apr 2025 13:50:09 +0200 Subject: [PATCH 5/5] test - pkg publish --- .github/workflows/build.yml | 10 ++-------- .npmrc | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e9c252..b46b174 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,14 +25,8 @@ jobs: run: cp ./.npmrc ~/.npmrc shell: bash - - name: Authenticate with npm adduser - run: | - echo "Logging in to GitHub Package Registry" - npm adduser < ~/.npmrc shell: bash - name: Install dependencies diff --git a/.npmrc b/.npmrc index 29b101d..fe30047 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ @ikhokha:registry=https://npm.pkg.github.com -//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGE_TOKEN} \ No newline at end of file +# //npm.pkg.github.com/:_authToken=${GITHUB_PACKAGE_TOKEN} \ No newline at end of file