-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (59 loc) · 1.87 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
push:
tags:
- '*'
env:
node: true
es6: true
jobs:
release_job_linux:
runs-on: ubuntu-latest
name: 💾 Releasing
steps:
- name: ✔ Checkout
uses: actions/checkout@v4
- name: 💻 Download node and release package
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm install --save-dev
- run: npm run build
- run: npm install -g @yao-pkg/pkg
- run: pkg dist/index.js
- name: 🛠 Draft Release
id: draft_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ✨ ${{ github.ref }}
draft: false
- name: 🛠 Build Release (Linux)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.draft_release.outputs.upload_url }}
asset_path: ./index-linux
asset_name: blahaj-linux-x64
asset_content_type: application/x-elf
- name: 🛠 Build Release (Windows)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.draft_release.outputs.upload_url }}
asset_path: ./index-win.exe
asset_name: blahaj-win-x64.exe
asset_content_type: application/vnd.microsoft.portable-executable
- name: 🛠 Build Release (macOS)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.draft_release.outputs.upload_url }}
asset_path: ./index-macos
asset_name: blahaj-macos-x64
asset_content_type: application/x-mach-binary