Skip to content

1.1.0

1.1.0 #5

Workflow file for this run

name: release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: install pkg
run: npm install -g @yao-pkg/pkg
- name: install node dependencies
run: npm install --omit dev
- name: build
run: pkg package.json
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: exe
path: dist/
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: download artifact
uses: actions/download-artifact@v4
with:
name: exe
path: dist
- name: add build.json
run: 'echo "{\"version\": \"${{ github.ref_name }}\", \"commit\": \"${{ github.sha }}\"}" > dist/build.json'
- name: compress release
run: 'zip -r ${{ github.event.repository.name }}-${{ github.ref_name }}.zip dist'
- name: upload release
uses: softprops/action-gh-release@v2
with:
files: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip