Skip to content

Commit c3a189e

Browse files
authored
Merge pull request #10 from ikhokha/feature/cicd
test - pkg publish
2 parents 881fe79 + 35e039b commit c3a189e

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main]
66

77
env:
8+
NODE_VERSION: 18.x
89
GITHUB_PACKAGE_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN}}
910
NPM_ACCESS_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN }}
1011

@@ -13,14 +14,12 @@ jobs:
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout code
16-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1718

1819
- name: Setup node
1920
uses: actions/setup-node@v3
2021
with:
21-
node-version: '18.x'
22-
registry-url: 'https://npm.pkg.github.com'
23-
scope: '@octocat'
22+
node-version: ${{env.NODE_VERSION}}
2423

2524
- name: Copying config files
2625
run: cp ./.npmrc ~/.npmrc
@@ -29,11 +28,14 @@ jobs:
2928
- name: Install dependencies
3029
run: yarn install
3130

31+
- name: Build
32+
run: yarn build
33+
3234
# - name: Linting
3335
# run: yarn lint --format junit -o reports/junit/js-lint-results.xml
34-
36+
3537
- name: Typechecking
3638
run: yarn typecheck
3739

3840
- name: Dry-run publish package
39-
run: npm publish --dry-run
41+
run: npm publish --dry-run --access restricted

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ on:
55
branches: [main]
66

77
env:
8+
NODE_VERSION: 18.x
89
GITHUB_PACKAGE_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN}}
9-
# NPM_ACCESS_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN }}
10-
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
10+
NPM_ACCESS_TOKEN: ${{ secrets.GHP_ACCESS_TOKEN }}
1111

1212
jobs:
1313
publish-pkg:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818

1919
- name: Setup node
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: '18.x'
22+
node-version: ${{env.NODE_VERSION}}
2323

2424
- name: Copying config files
2525
run: cp ./.npmrc ~/.npmrc
@@ -38,4 +38,4 @@ jobs:
3838
run: yarn typecheck
3939

4040
- name: Publish npm pkg
41-
run: npm publish
41+
run: npm publish --access restricted

.npmrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
@ikhokha:registry=https://npm.pkg.github.com
2-
//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGE_TOKEN}
3-
# //registry.npmjs.org/:_authToken=${NPM_ACCESS_TOKEN}
2+
//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGE_TOKEN}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@ikhokha/octet-buffer",
33
"version": "1.0.1",
44
"description": "Lightweight wrapper around Node Buffer, providing streaming read/write for uint8 to unit32",
5+
"private": true,
56
"author": "Simon Eumes <[email protected]>",
67
"contributors": [
78
{

0 commit comments

Comments
 (0)