Skip to content

Commit

Permalink
新增工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
think-flow committed Jun 21, 2024
1 parent 69c1736 commit 28d6920
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 120 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

46 changes: 19 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
name: Build

name: Build and release tag
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "**.spec.js"
- ".idea"
- ".vscode"
- ".dockerignore"
- "Dockerfile"
- ".gitignore"
- ".github/**"
- "!.github/workflows/build.yml"

tags:
- "v*"
workflow_dispatch: # 添加这一行以支持手动触发
jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

runs-on: windows-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Install Dependencies
run: npm install
Expand All @@ -39,9 +25,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: release_on_${{ matrix. os }}
path: release/
retention-days: 5
- name: Zip the build
run: powershell -Command "Compress-Archive -Path .\release\win-unpacked\* -DestinationPath .\l4d2addon_installer_${{ github.ref_name }}.zip"

- name: Install GitHub CLI
run: |
Invoke-WebRequest -Uri https://github.com/cli/cli/releases/download/v2.0.0/gh_2.0.0_windows_amd64.msi -OutFile gh.msi
Start-Process msiexec.exe -Wait -ArgumentList '/I gh.msi /quiet'
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ github.ref }} l4d2addon_installer_${{ github.ref_name }}.zip --title "${{ github.ref_name }}" --notes "TODO New Release."
81 changes: 0 additions & 81 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion electron-builder.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"asar": true,
"productName": "l4d2addon_installer",
"directories": {
"output": "release/${version}"
"output": "release"
},
"files": [
"dist",
Expand Down

0 comments on commit 28d6920

Please sign in to comment.