From 0e35569cbfa8e6819f1455654c0a64513e584b03 Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:00:10 +0000 Subject: [PATCH 01/13] added new pactch release workflow --- .github/workflows/new-patch-release.yaml | 43 ++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/new-patch-release.yaml diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml new file mode 100644 index 0000000..cf78b0c --- /dev/null +++ b/.github/workflows/new-patch-release.yaml @@ -0,0 +1,43 @@ +# This is a basic workflow to help you get started with Actions + +name: new patch release + +# Controls when the action will run. +on: +# Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token + fetch-depth: 0 + + - name: Node 14.x + uses: actions/setup-node@v2 + with: + node-version: 14.x + + - uses: bahmutov/npm-install@v1 + + - name: Patch Version and Deploy + run: npm run npm:publish:patch + + - name: Commit files + run: | + git config --local user.email "release-bot@users.noreply.github.com" + git config --local user.name "github-actions-release-bot" + git add projects/angular-lingua/package.json + git commit -m "Creating Patch release" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} \ No newline at end of file diff --git a/package.json b/package.json index 6f7f0ea..2f6dba9 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "test": "ng test", "test:ci": "ng test --watch=false --browsers=ChromeHeadlessCustom", "e2e": "ng e2e --project sample-e2e", - "npm:publish:patch": "cd projects/angular-lingua && npm version patch && cd ../../ && npm run build:lib && cd dist/angular-lingua && npm publish && cd ../../" + "npm:publish:patch": "cd projects/angular-lingua && npm version patch && cd ../../ && npm run build:lib && cd dist/angular-lingua && npm pack && cd ../../" }, "license": "agpl-3.0", "author": { From e0a6f77ee754be11fbacdddad5d712ef0ea66929 Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:01:14 +0000 Subject: [PATCH 02/13] fix yaml --- .github/workflows/new-patch-release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml index cf78b0c..74f6460 100644 --- a/.github/workflows/new-patch-release.yaml +++ b/.github/workflows/new-patch-release.yaml @@ -35,9 +35,9 @@ jobs: git config --local user.name "github-actions-release-bot" git add projects/angular-lingua/package.json git commit -m "Creating Patch release" - + - name: Push changes uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} \ No newline at end of file + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} \ No newline at end of file From 7765638ba3020975f7858b71ea9bb28c5728ca86 Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:03:20 +0000 Subject: [PATCH 03/13] tmp copy --- .github/workflows/new-patch-release-copy.yaml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/new-patch-release-copy.yaml diff --git a/.github/workflows/new-patch-release-copy.yaml b/.github/workflows/new-patch-release-copy.yaml new file mode 100644 index 0000000..a8654cd --- /dev/null +++ b/.github/workflows/new-patch-release-copy.yaml @@ -0,0 +1,43 @@ +# This is a basic workflow to help you get started with Actions + +name: new patch release copy + +# Controls when the action will run. +on: +# Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token + fetch-depth: 0 + + - name: Node 14.x + uses: actions/setup-node@v2 + with: + node-version: 14.x + + - uses: bahmutov/npm-install@v1 + + - name: Patch Version and Deploy + run: npm run npm:publish:patch + + - name: Commit files + run: | + git config --local user.email "release-bot@users.noreply.github.com" + git config --local user.name "github-actions-release-bot" + git add projects/angular-lingua/package.json + git commit -m "Creating Patch release" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} \ No newline at end of file From ac6865a4c2fc2f7b6e99973d93c9f5b4223a4397 Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:10:39 +0000 Subject: [PATCH 04/13] add on push --- .github/workflows/new-patch-release.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml index 74f6460..16f06b3 100644 --- a/.github/workflows/new-patch-release.yaml +++ b/.github/workflows/new-patch-release.yaml @@ -2,9 +2,8 @@ name: new patch release -# Controls when the action will run. on: -# Allows you to run this workflow manually from the Actions tab + push: workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel From 0a26d0e11652e2fece517bf6eaf541a1909c268d Mon Sep 17 00:00:00 2001 From: github-actions-release-bot Date: Fri, 25 Jun 2021 12:11:37 +0000 Subject: [PATCH 05/13] Creating Patch release --- projects/angular-lingua/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/angular-lingua/package.json b/projects/angular-lingua/package.json index 35c550d..249954e 100644 --- a/projects/angular-lingua/package.json +++ b/projects/angular-lingua/package.json @@ -1,6 +1,6 @@ { "name": "angular-lingua", - "version": "0.1.10", + "version": "0.1.11", "peerDependencies": { "@angular/common": ">=12.0.0", "@angular/core": ">=12.0.0" From ac29d9cb7183900959ca04c79bbb198cb91c789d Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:21:30 +0000 Subject: [PATCH 06/13] adding version to patch commit message --- .github/workflows/new-patch-release.yaml | 3 ++- package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml index 16f06b3..84d93b6 100644 --- a/.github/workflows/new-patch-release.yaml +++ b/.github/workflows/new-patch-release.yaml @@ -30,10 +30,11 @@ jobs: - name: Commit files run: | + newVersion=$(npm --silent run lib:version) git config --local user.email "release-bot@users.noreply.github.com" git config --local user.name "github-actions-release-bot" git add projects/angular-lingua/package.json - git commit -m "Creating Patch release" + git commit -m "Creating Patch release: v${newVersion}" - name: Push changes uses: ad-m/github-push-action@master diff --git a/package.json b/package.json index 2f6dba9..6ea0a56 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "test": "ng test", "test:ci": "ng test --watch=false --browsers=ChromeHeadlessCustom", "e2e": "ng e2e --project sample-e2e", - "npm:publish:patch": "cd projects/angular-lingua && npm version patch && cd ../../ && npm run build:lib && cd dist/angular-lingua && npm pack && cd ../../" + "npm:publish:patch": "cd projects/angular-lingua && npm version patch && cd ../../ && npm run build:lib && cd dist/angular-lingua && npm pack && cd ../../", + "lib:version": "cd projects/angular-lingua && npx -c 'echo \"$npm_package_version\"' && cd ../../" }, "license": "agpl-3.0", "author": { From 7ab1820ece68a5085f1491120c73ba5ece1809c7 Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:21:57 +0000 Subject: [PATCH 07/13] added gitmoji --- .github/workflows/new-patch-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml index 84d93b6..e686e72 100644 --- a/.github/workflows/new-patch-release.yaml +++ b/.github/workflows/new-patch-release.yaml @@ -34,7 +34,7 @@ jobs: git config --local user.email "release-bot@users.noreply.github.com" git config --local user.name "github-actions-release-bot" git add projects/angular-lingua/package.json - git commit -m "Creating Patch release: v${newVersion}" + git commit -m ":bookmark: Creating Patch release: v${newVersion}" - name: Push changes uses: ad-m/github-push-action@master From 521ccf84136da80df1131af203aff6958eda24a3 Mon Sep 17 00:00:00 2001 From: github-actions-release-bot Date: Fri, 25 Jun 2021 12:22:52 +0000 Subject: [PATCH 08/13] :bookmark: Creating Patch release: v0.1.12 --- projects/angular-lingua/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/angular-lingua/package.json b/projects/angular-lingua/package.json index 249954e..9a00d25 100644 --- a/projects/angular-lingua/package.json +++ b/projects/angular-lingua/package.json @@ -1,6 +1,6 @@ { "name": "angular-lingua", - "version": "0.1.11", + "version": "0.1.12", "peerDependencies": { "@angular/common": ">=12.0.0", "@angular/core": ">=12.0.0" From cd4a8b21139412c6da350fd1fcfffda9c026dfa6 Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:26:16 +0000 Subject: [PATCH 09/13] tag new patch version --- .github/workflows/new-patch-release-copy.yaml | 43 ------------------- .github/workflows/new-patch-release.yaml | 4 +- 2 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/new-patch-release-copy.yaml diff --git a/.github/workflows/new-patch-release-copy.yaml b/.github/workflows/new-patch-release-copy.yaml deleted file mode 100644 index a8654cd..0000000 --- a/.github/workflows/new-patch-release-copy.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: new patch release copy - -# Controls when the action will run. -on: -# Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token - fetch-depth: 0 - - - name: Node 14.x - uses: actions/setup-node@v2 - with: - node-version: 14.x - - - uses: bahmutov/npm-install@v1 - - - name: Patch Version and Deploy - run: npm run npm:publish:patch - - - name: Commit files - run: | - git config --local user.email "release-bot@users.noreply.github.com" - git config --local user.name "github-actions-release-bot" - git add projects/angular-lingua/package.json - git commit -m "Creating Patch release" - - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} \ No newline at end of file diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml index e686e72..0becc11 100644 --- a/.github/workflows/new-patch-release.yaml +++ b/.github/workflows/new-patch-release.yaml @@ -35,9 +35,11 @@ jobs: git config --local user.name "github-actions-release-bot" git add projects/angular-lingua/package.json git commit -m ":bookmark: Creating Patch release: v${newVersion}" + git tag "v${newVersion} - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} \ No newline at end of file + branch: ${{ github.ref }} + tags: true \ No newline at end of file From 68086593ff3531789f304c60393092cb111c56ed Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:27:58 +0000 Subject: [PATCH 10/13] fix script --- .github/workflows/new-patch-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml index 0becc11..0308994 100644 --- a/.github/workflows/new-patch-release.yaml +++ b/.github/workflows/new-patch-release.yaml @@ -35,7 +35,7 @@ jobs: git config --local user.name "github-actions-release-bot" git add projects/angular-lingua/package.json git commit -m ":bookmark: Creating Patch release: v${newVersion}" - git tag "v${newVersion} + git tag "v${newVersion}" - name: Push changes uses: ad-m/github-push-action@master From a2c267ba06d21aeb75449608d2ac7da440bcdf40 Mon Sep 17 00:00:00 2001 From: github-actions-release-bot Date: Fri, 25 Jun 2021 12:29:06 +0000 Subject: [PATCH 11/13] :bookmark: Creating Patch release: v0.1.13 --- projects/angular-lingua/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/angular-lingua/package.json b/projects/angular-lingua/package.json index 9a00d25..3bb1ed5 100644 --- a/projects/angular-lingua/package.json +++ b/projects/angular-lingua/package.json @@ -1,6 +1,6 @@ { "name": "angular-lingua", - "version": "0.1.12", + "version": "0.1.13", "peerDependencies": { "@angular/common": ">=12.0.0", "@angular/core": ">=12.0.0" From 390e6c1c653f3a6b667565a4e407f8ffbaba12b3 Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:42:52 +0000 Subject: [PATCH 12/13] added npm publish to action --- .github/workflows/new-patch-release.yaml | 8 ++++++-- package.json | 2 +- projects/angular-lingua/package.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml index 0308994..bab3e79 100644 --- a/.github/workflows/new-patch-release.yaml +++ b/.github/workflows/new-patch-release.yaml @@ -3,7 +3,6 @@ name: new patch release on: - push: workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel @@ -26,7 +25,12 @@ jobs: - uses: bahmutov/npm-install@v1 - name: Patch Version and Deploy - run: npm run npm:publish:patch + run: npm run version:patch:build + + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./dist/angular-lingua/package.json - name: Commit files run: | diff --git a/package.json b/package.json index 6ea0a56..e5b565b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "test": "ng test", "test:ci": "ng test --watch=false --browsers=ChromeHeadlessCustom", "e2e": "ng e2e --project sample-e2e", - "npm:publish:patch": "cd projects/angular-lingua && npm version patch && cd ../../ && npm run build:lib && cd dist/angular-lingua && npm pack && cd ../../", + "version:patch:build": "cd projects/angular-lingua && npm version patch && cd ../../ && npm run build:lib", "lib:version": "cd projects/angular-lingua && npx -c 'echo \"$npm_package_version\"' && cd ../../" }, "license": "agpl-3.0", diff --git a/projects/angular-lingua/package.json b/projects/angular-lingua/package.json index 9a00d25..35c550d 100644 --- a/projects/angular-lingua/package.json +++ b/projects/angular-lingua/package.json @@ -1,6 +1,6 @@ { "name": "angular-lingua", - "version": "0.1.12", + "version": "0.1.10", "peerDependencies": { "@angular/common": ">=12.0.0", "@angular/core": ">=12.0.0" From 16e29123b606c0dbd62700487e1a57c8df532ddb Mon Sep 17 00:00:00 2001 From: Donato Wolfisberg Date: Fri, 25 Jun 2021 12:57:17 +0000 Subject: [PATCH 13/13] change how env is given --- .github/workflows/new-patch-release.yaml | 10 +++++----- package.json | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/new-patch-release.yaml b/.github/workflows/new-patch-release.yaml index bab3e79..5f1a620 100644 --- a/.github/workflows/new-patch-release.yaml +++ b/.github/workflows/new-patch-release.yaml @@ -26,11 +26,11 @@ jobs: - name: Patch Version and Deploy run: npm run version:patch:build - - - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./dist/angular-lingua/package.json + + - name: Publish + run: npm run lib:publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Commit files run: | diff --git a/package.json b/package.json index e5b565b..0b67e6c 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "test:ci": "ng test --watch=false --browsers=ChromeHeadlessCustom", "e2e": "ng e2e --project sample-e2e", "version:patch:build": "cd projects/angular-lingua && npm version patch && cd ../../ && npm run build:lib", - "lib:version": "cd projects/angular-lingua && npx -c 'echo \"$npm_package_version\"' && cd ../../" + "lib:version": "cd projects/angular-lingua && npx -c 'echo \"$npm_package_version\"' && cd ../../", + "lib:publish": "cd dist/angular-lingua && npm publish && cd ../../" }, "license": "agpl-3.0", "author": {