-
Notifications
You must be signed in to change notification settings - Fork 219
40 lines (37 loc) · 1.02 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
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
workflow_dispatch:
jobs:
run-build:
runs-on: windows-2022
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- name: Copy Node.exe to repository directory
run: Copy-Item (Get-Command node.exe | Select-Object -ExpandProperty Definition) .
- run: npm test
- run: npm run build
- name: Archive build artifact
if: github.ref_type == 'branch'
uses: actions/upload-artifact@v3
with:
name: Installer
path: "build/out/NodistSetup-*.exe"
- name: Create release draft
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
artifacts: "build/out/NodistSetup-*.exe"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true