Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Commit e37b230

Browse files
author
Sujaykumar Hublikar
committed
update workflow
1 parent 460ebda commit e37b230

File tree

1 file changed

+36
-20
lines changed

1 file changed

+36
-20
lines changed

.github/workflows/publish.yml

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
name: Checkout
2626
uses: actions/checkout@v2
2727

28+
- name: Set env
29+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
30+
2831
# Use nodejs
2932
- uses: actions/setup-node@v1
3033
with:
@@ -33,27 +36,13 @@ jobs:
3336
# Install npm packages
3437
- run: npm install
3538

36-
# Build dist
39+
# dist setup
3740
- run: rm -rf dist/.git* # delete .git* files
38-
- run: npm run all
39-
40-
# publish release
41-
- run: echo ${{ github.sha }} >> Release.txt
41+
- run: echo ${{ env.RELEASE_VERSION }} >> Release.txt
4242
- run: mv LICENSE LICENSE.txt
43-
- name: "📦 Github Release"
44-
uses: "marvinpinto/action-automatic-releases@latest"
45-
if: startsWith(github.ref, 'refs/tags/')
46-
with:
47-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
48-
automatic_release_tag: "latest"
49-
prerelease: false
50-
files: |
51-
src/*.js
52-
dist/*.js
53-
package.json
54-
Release.txt
55-
LICENSE.txt
56-
README.md
43+
44+
# Build dist
45+
- run: npm run all
5746

5847
# Publish to npm
5948
- name: "📦 publish to npm"
@@ -70,4 +59,31 @@ jobs:
7059
token: ${{ secrets.GITHUB_TOKEN }}
7160
access: "public"
7261
registry: "https://npm.pkg.github.com"
73-
check-version: true
62+
check-version: true
63+
64+
# publish release
65+
- uses: papeloto/action-zip@v1
66+
with:
67+
files: |
68+
dist/plugin.js
69+
dist/plugin.min.js
70+
src/plugin.js
71+
package.json
72+
README.md
73+
LICENSE.txt
74+
recursive: false
75+
dest: dist.zip
76+
- run: sha256sum dist.zip >> dist.zip.sha256
77+
- run: md5sum dist.zip >> dist.zip.md5
78+
79+
- name: "📦 Github Release"
80+
uses: "marvinpinto/action-automatic-releases@latest"
81+
if: startsWith(github.ref, 'refs/tags/')
82+
with:
83+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
84+
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
85+
prerelease: false
86+
files: |
87+
dist.zip
88+
dist.zip.sha256
89+
dist.zip.md5

0 commit comments

Comments
 (0)