-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (47 loc) · 1.37 KB
/
build.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
name: Build and Release
on:
push:
tags:
- v**
jobs:
build_and_release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install packages
run: sudo apt-get install build-essential mingw-w64 clang
- name: Set Tag Name
id: set_tag
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build for Windows
run: make win32
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.set_tag.outputs.tag_name }}
release_name: ${{ steps.set_tag.outputs.tag_name }}
draft: false
prerelease: false
- name: Upload Release Assets
id: upload-release-assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/win32/qrean.zip
asset_name: qrean-win32-${{ steps.set_tag.outputs.tag_name }}.zip
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}