Skip to content

Commit

Permalink
add release
Browse files Browse the repository at this point in the history
  • Loading branch information
swk777 committed May 24, 2024
1 parent 63cd131 commit fe773ac
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 12 deletions.
83 changes: 72 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "**.spec.js"
- ".idea"
- ".vscode"
- ".dockerignore"
- "Dockerfile"
- ".gitignore"
- ".github/**"
- "!.github/workflows/build.yml"
- '**.md'
- '**.spec.js'
- '.idea'
- '.vscode'
- '.dockerignore'
- 'Dockerfile'
- '.gitignore'
- '.github/**'
- '!.github/workflows/build.yml'
tags:
- 'v*.*.*' # 只在推送标签时触发

jobs:
build:
Expand Down Expand Up @@ -42,6 +44,65 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: release_on_${{ matrix. os }}
name: release_on_${{ matrix.os }}
path: release/
retention-days: 5
retention-days: 5

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact from macOS
uses: actions/download-artifact@v3
with:
name: release_on_macos-latest
path: ./macos

- name: Download Artifact from Ubuntu
uses: actions/download-artifact@v3
with:
name: release_on_ubuntu-latest
path: ./ubuntu

- name: Download Artifact from Windows
uses: actions/download-artifact@v3
with:
name: release_on_windows-latest
path: ./windows

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
This is the release for ${{ github.ref }}.
draft: false
prerelease: false

- name: Upload macOS Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./macos
asset_name: macos_release.zip
asset_content_type: application/zip

- name: Upload Ubuntu Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ubuntu
asset_name: ubuntu_release.zip
asset_content_type: application/zip

- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./windows
asset_name: windows_release.zip
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "VisionFlow",
"version": "2.2.0",
"version": "0.0.1",
"main": "dist-electron/main/index.js",
"description": "Electron Vite React boilerplate.",
"author": "swk777",
Expand Down

0 comments on commit fe773ac

Please sign in to comment.