Skip to content

Commit 5c7b902

Browse files
committed
Added the new release workflow, and npm audit fix
1 parent b81e468 commit 5c7b902

File tree

2 files changed

+37
-53
lines changed

2 files changed

+37
-53
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
- name: get-npm-version
1818
id: package-version
19-
uses: martinbeentjes/npm-get-version-action@master
19+
uses: martinbeentjes/npm-get-version-action@v1.3.1
2020
- name: install npm packall
2121
run: npm install npm-pack-all
2222

@@ -26,25 +26,9 @@ jobs:
2626
with:
2727
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2828
tag_prefix: "v"
29-
- name: Create Release
29+
- name: github-release
3030
if: steps.update_tag.outputs.tagname
31-
uses: actions/create-release@v1.1.4
32-
id: create_release
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
35-
with:
36-
tag_name: ${{ steps.update_tag.outputs.tagname }}
37-
release_name: Release ${{ steps.update_tag.outputs.tagname }}
38-
draft: false # Default value, but nice to set explicitly
39-
prerelease: false # Default value, but nice to set explicitly
40-
- name: Upload Release Asset
41-
if: steps.update_tag.outputs.tagname
42-
id: upload-release-asset
43-
uses: actions/upload-release-asset@v1
31+
id: github-release
4432
env:
4533
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
with:
47-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
48-
asset_path: ./contentstack-cli-cm-regex-validate-${{ steps.package-version.outputs.current-version }}.tgz
49-
asset_name: contentstack-cli-cm-regex-validate-${{ steps.package-version.outputs.current-version }}.tgz
50-
asset_content_type: application/tgz
34+
run: gh release create v${{ steps.package-version.outputs.current-version }} --title "Release ${{ steps.package-version.outputs.current-version }}" --generate-notes ./contentstack-cli-cm-regex-validate-${{ steps.package-version.outputs.current-version }}.tgz

package-lock.json

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)