mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2024-11-10 07:40:22 +08:00
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
push:
|
|
# Sequence of patterns matched against refs/tag
|
|
tags:
|
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
name: Release
|
|
|
|
jobs:
|
|
build:
|
|
name: Release
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '16.x'
|
|
- name: Build App
|
|
run: |
|
|
yarn --frozen-lockfile
|
|
yarn build:win32
|
|
yarn build-update
|
|
- name: Create Release
|
|
if: success()
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: ZzzSignalSearchExport ${{ github.ref }}
|
|
draft: false
|
|
prerelease: false
|
|
- name: Upload Release Asset
|
|
if: success()
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
asset_path: ./build/app.zip
|
|
asset_name: ZzzSignalSearchExport.zip
|
|
asset_content_type: application/zip
|
|
- name: Deploy update
|
|
if: success()
|
|
uses: crazy-max/ghaction-github-pages@v2
|
|
with:
|
|
commit_message: Update app
|
|
build_dir: ./build/update
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.TOKEN }} |