Skip to content

Commit

Permalink
build: fix npmjs release
Browse files Browse the repository at this point in the history
  • Loading branch information
jawish committed Oct 31, 2024
1 parent 29955fd commit 09daa78
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,29 @@ jobs:
- name: Install dependencies
run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: Build project
run: yarn build
- name: Serve example app
continue-on-error: false
run: yarn run serve
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: Build project and run tests
continue-on-error: false
run: yarn run run-tests
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}

release-npm:
needs: build
name: Release npm
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
Expand All @@ -65,15 +70,15 @@ jobs:
registry-url: https://registry.npmjs.org/
- run: yarn install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: Build project
continue-on-error: false
run: yarn build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}
GIT_COMMIT: ${{ github.sha }}
Expand All @@ -86,6 +91,11 @@ jobs:
needs: build
name: Release gpr
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
Expand All @@ -95,18 +105,18 @@ jobs:
scope: "@lottiefiles"
- run: yarn install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: Build project
continue-on-error: false
run: yarn build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- run:
echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" >
~/.npmrc
- run: npm publish --@lottiefiles:registry=https://npm.pkg.github.com/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}
GIT_COMMIT: ${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@lottiefiles:registry=https://npm.pkg.github.com
# @lottiefiles:registry=https://npm.pkg.github.com
# @lottiefiles:registry=https://registry.npmjs.org/
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@commitlint/config-conventional": "^16.0.0",
"@cypress/code-coverage": "^3.9.12",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@lottiefiles/eslint-plugin": "^2.2.0",
"@lottiefiles/eslint-plugin": "^3.0.0",
"@rollup/plugin-babel": "^5.1.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
Expand Down Expand Up @@ -121,5 +121,6 @@
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"all": true
}
},
"packageManager": "[email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
}

0 comments on commit 09daa78

Please sign in to comment.