Skip to content

Commit 30f884a

Browse files
committed
fix: github release action
1 parent 71b16c4 commit 30f884a

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.github/workflows/release.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,7 @@ name: Release
22
on: [push]
33

44
jobs:
5-
get-package-version:
6-
runs-on: ubuntu-latest
7-
steps:
8-
- name: get package version
9-
id: package-version
10-
uses: martinbeentjes/npm-get-version-action@master
11-
outputs:
12-
package-version: ${{ steps.package-version.outputs.current-version }}
13-
14-
build:
15-
needs: [get-package-version]
5+
build-and-release:
166
runs-on: ${{ matrix.os }}
177
strategy:
188
matrix:
@@ -23,17 +13,18 @@ jobs:
2313
uses: actions/checkout@v2
2414
- name: setup node
2515
uses: actions/setup-node@v2
26-
with:
27-
node-version: 14
16+
with:
17+
node-version: 14
2818
- name: install dependencies
2919
run: npm ci
3020
- name: install pkg
3121
run: npm install -D pkg
22+
3223
- name: build
3324
run: npm run build-${{ matrix.os }}
3425
- name: add to release
3526
uses: softprops/action-gh-release@v1
3627
with:
37-
files: build/bin/cithak.*
28+
files: build/bin/cithak*
3829
draft: true
39-
tag_name: v${{ needs.get-package-version.outputs.package-version }}
30+
tag_name: v${{ env.GITHUB_SHA }}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"build": "NODE_ENV=production rollup -c",
88
"publish": "npm run build",
99
"dev": "rollup -cw",
10-
"build-ubuntu-latest": "pkg -t linux ./cithak.js -o ./build/bin/cithak",
11-
"build-windows-latest": "pkg -t win ./cithak.js -o ./build/bin/cithak",
12-
"build-macos-latest": "pkg -t mac ./cithak.js -o ./build/bin/cithak"
10+
"build-ubuntu-latest": "pkg -t linux ./cithak.js -o ./build/bin/cithak-linux",
11+
"build-windows-latest": "pkg -t win ./cithak.js -o ./build/bin/cithak-win",
12+
"build-macos-latest": "pkg -t mac ./cithak.js -o ./build/bin/cithak-mac"
1313
},
1414
"bin": {
1515
"cithak": "bin/cithak",

0 commit comments

Comments
 (0)