-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.7 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Release(ドラフト)を作る
# 参考http://skawashima.com/blog/2019/12/github-actions-auto-release/
name: Publish
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: windows-latest
env:
output: PanoramaApp/bin/Release/net8.0-windows/win-x64/publish/
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Publish
run: dotnet publish -c Release --self-contained true -p:PublishSingleFile=true
- name: Create Zip
run: Compress-Archive -Path ${{ env.output }}* -DestinationPath ${{ env.output }}App.zip
shell: pwsh
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
# 使い方
1. App.zipをダウンロードして展開
2. PanoramaApp.exeを実行
Windows Diffenderが警告を出しますが気にしないでください。
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.output }}App.zip
asset_name: App.zip
asset_content_type: application/zip