2024-04-02 10:05:47 +00:00
|
|
|
name: Publish Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
2024-04-02 10:12:41 +00:00
|
|
|
tags: '*'
|
2024-04-02 10:05:47 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: windows-2022
|
|
|
|
|
|
|
|
steps:
|
2024-04-02 10:12:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-04-02 10:05:47 +00:00
|
|
|
- name: Set up Node.js 20.x
|
2024-04-02 10:12:41 +00:00
|
|
|
uses: actions/setup-node@v4
|
2024-04-02 10:05:47 +00:00
|
|
|
with:
|
|
|
|
node-version: 20.x
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install
|
|
|
|
- name: Pack into zip and create installer
|
|
|
|
run: npm run dist
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
path: dist
|
|
|
|
|
|
|
|
publish-release:
|
2024-04-02 10:12:41 +00:00
|
|
|
if: contains(github.ref, 'refs/tags/')
|
2024-04-02 10:05:47 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Download artifact
|
|
|
|
uses: actions/download-artifact@master
|
|
|
|
- name: Create release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
2024-04-02 10:12:41 +00:00
|
|
|
artifacts: "artifact/*-ia32-win.zip,artifact/*.exe"
|
2024-04-02 10:05:47 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|