Skip to content

Commit 5379d2b

Browse files
committed
refactor! refactored CI files
1 parent baf7ea7 commit 5379d2b

2 files changed

Lines changed: 47 additions & 30 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,7 @@ jobs:
2222
zip-and-publish:
2323
name: Zip & Publish
2424
needs: build
25-
runs-on: windows-2022
2625
if: startsWith(github.ref, 'refs/tags/')
27-
steps:
28-
- name: Download Build Artifact
29-
uses: actions/download-artifact@v4
30-
with:
31-
name: build-output
32-
path: output
33-
34-
- name: Zip Build Output
35-
run: |
36-
$Tag = "${{ github.ref_name }}"
37-
$ZipName = "SubtitlesAdjuster_$Tag.zip"
38-
powershell Compress-Archive -Path output\*.exe -DestinationPath $ZipName
39-
40-
- name: Create GitHub Release
41-
uses: softprops/action-gh-release@v1
42-
with:
43-
tag_name: ${{ github.ref_name }}
44-
name: Subtitles Adjuster ${{ github.ref_name }}
45-
draft: false
46-
prerelease: false
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
50-
- name: Upload Release Asset
51-
uses: softprops/action-gh-release@v1
52-
with:
53-
files: SubtitlesAdjuster_${{ github.ref_name }}.zip
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
uses: ./.github/workflows/release-dotnet-framework.yml
27+
with:
28+
solution: $env:SOLUTION_FILE
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release .NET Framework Desktop App
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
solution:
7+
required: true
8+
type: string
9+
10+
outputs:
11+
output-path:
12+
description: "Build output path"
13+
value: ${{ jobs.release.outputs.output-path }}
14+
15+
env:
16+
SOLUTION_FILE: SA.sln
17+
18+
jobs:
19+
release:
20+
runs-on: windows-2022
21+
22+
steps:
23+
- name: Zip Build Output
24+
run: |
25+
$Tag = "${{ github.ref_name }}"
26+
$ZipName = "SubtitlesAdjuster_$Tag.zip"
27+
powershell Compress-Archive -Path bin\Release\*.exe -DestinationPath $ZipName
28+
29+
- name: Create GitHub Release
30+
uses: softprops/action-gh-release@v1
31+
with:
32+
tag_name: ${{ github.ref_name }}
33+
name: Subtitles Adjuster ${{ github.ref_name }}
34+
draft: false
35+
prerelease: false
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Upload Release Asset
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
files: SubtitlesAdjuster_${{ github.ref_name }}.zip
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)