Skip to content

test - pkg publish #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
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
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]

env:
NODE_VERSION: 18.x
GITHUB_PACKAGE_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN}}
NPM_ACCESS_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN }}

Expand All @@ -13,14 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@octocat'
node-version: ${{env.NODE_VERSION}}

- name: Copying config files
run: cp ./.npmrc ~/.npmrc
Expand All @@ -29,11 +28,14 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

# - name: Linting
# run: yarn lint --format junit -o reports/junit/js-lint-results.xml

- name: Typechecking
run: yarn typecheck

- name: Dry-run publish package
run: npm publish --dry-run
run: npm publish --dry-run --access restricted
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ on:
branches: [main]

env:
NODE_VERSION: 18.x
GITHUB_PACKAGE_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN}}
# NPM_ACCESS_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN }}
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
NPM_ACCESS_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN }}

jobs:
publish-pkg:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: ${{env.NODE_VERSION}}

- name: Copying config files
run: cp ./.npmrc ~/.npmrc
Expand All @@ -38,4 +38,4 @@ jobs:
run: yarn typecheck

- name: Publish npm pkg
run: npm publish
run: npm publish --access restricted
3 changes: 1 addition & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@ikhokha:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGE_TOKEN}
# //registry.npmjs.org/:_authToken=${NPM_ACCESS_TOKEN}
//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGE_TOKEN}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": true,
"author": "Simon Eumes <[email protected]>",
"contributors": [
{
Expand Down