Skip to content

Commit

Permalink
ci: update release build step (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhwhite authored Feb 25, 2023
2 parents b97cded + 9e3870b commit 436c1f0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ jobs:
with:
release-type: node
default-branch: '${{ github.ref_name }}'
extra-files: >
[
{ "type": "json", "path": "libs/ng-keyboard-sort/package.json", "jsonpath": "$.version" }
]
changelog-notes-type: 'github'
package-name: ng-keyboard-sort
token: ${{ secrets.GH_TOKEN }}
changelog-types: >
[
Expand Down Expand Up @@ -56,6 +54,9 @@ jobs:
- name: Install
run: npm ci
if: ${{ steps.release.outputs.release_created && steps.cache-node-modules.outputs.cache-hit != 'true' }}
- name: Build
run: npm run build:package
if: ${{ steps.release.outputs.release_created && steps.cache-node-modules.outputs.cache-hit != 'true' }}
- name: Publish to NPM
if: ${{ steps.release.outputs.release_created }}
env:
Expand All @@ -64,5 +65,6 @@ jobs:
echo '//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}' >> ~/.npmrc
cd dist/ng-keyboard-sort
set -x
npm version ${{ steps.release.outputs.version }}
npm publish --access public --tag "v${{ steps.release.outputs.major }}-lts"
npm publish --access public --tag "latest"
2 changes: 1 addition & 1 deletion libs/ng-keyboard-sort/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ng-keyboard-sort",
"description": "Angular keyboard sort directive",
"version": "1.1.0",
"version": "0.0.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ng-keyboard-sort",
"description": "Angular keyboard sort directive",
"version": "0.0.0",
"version": "1.1.0",
"license": "MIT",
"private": true,
"repository": {
Expand All @@ -13,6 +13,7 @@
"ng": "ng",
"start": "nx s e2e",
"build": "nx run-many --target=build --all",
"build:package": "nx run ng-keyboard-sort:build:production",
"watch": "nx build ng-keyboard-sort --watch --configuration development",
"test": "nx test ng-keyboard-sort --browsers=ChromeHeadless --code-coverage --watch=false",
"test:e2e": "nx test e2e --browsers=ChromeHeadless --code-coverage --watch=false",
Expand Down

0 comments on commit 436c1f0

Please sign in to comment.