-
Notifications
You must be signed in to change notification settings - Fork 9
131 lines (119 loc) · 5.91 KB
/
draftnewrelease.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Draft new release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Version 5.0.0.0
body: |
- First Change
- Second Change
draft: true
prerelease: false
- name: Create release folder
run: |
mkdir -p ${{ github.workspace }}/release
- name: Publish Windows x86
run: dotnet publish ConsoleAppCore/ConsoleAppCore.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -r win-x86 --self-contained true -o ${{ github.workspace }}/win-x86
- name: Zip Folder
run: zip -r -D -j ${{ github.workspace }}/release/win-x86.zip ${{ github.workspace }}/win-x86/
- name: Upload win-x86 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/win-x86.zip
asset_name: win-x86.zip
asset_content_type: application/zip
- name: Publish Windows x64
run: dotnet publish ConsoleAppCore/ConsoleAppCore.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -r win-x64 --self-contained true -o ${{ github.workspace }}/win-x64
- name: Zip Folder
run: zip -r -D -j ${{ github.workspace }}/release/win-x64.zip ${{ github.workspace }}/win-x64/
- name: Upload win-x64 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/win-x64.zip
asset_name: win-x64.zip
asset_content_type: application/zip
- name: Publish Linux ARM
run: dotnet publish ConsoleAppCore/ConsoleAppCore.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -r linux-arm --self-contained true -o ${{ github.workspace }}/linux-arm
- name: Zip Folder
run: zip -r -D -j ${{ github.workspace }}/release/linux-arm.zip ${{ github.workspace }}/linux-arm/
- name: Upload linux-arm release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/linux-arm.zip
asset_name: linux-arm.zip
asset_content_type: application/zip
- name: Publish Linux ARM x64
run: dotnet publish ConsoleAppCore/ConsoleAppCore.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -r linux-arm64 --self-contained true -o ${{ github.workspace }}/linux-arm64
- name: Zip Folder
run: zip -r -D -j ${{ github.workspace }}/release/linux-arm64.zip ${{ github.workspace }}/linux-arm64/
- name: Upload linux-arm64 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/linux-arm64.zip
asset_name: linux-arm64.zip
asset_content_type: application/zip
- name: Publish Linux x64
run: dotnet publish ConsoleAppCore/ConsoleAppCore.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -r linux-x64 --self-contained true -o ${{ github.workspace }}/linux-x64
- name: Zip Folder
run: zip -r -D -j ${{ github.workspace }}/release/linux-x64.zip ${{ github.workspace }}/linux-x64/
- name: Upload linux-x64 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/linux-x64.zip
asset_name: linux-x64.zip
asset_content_type: application/zip
- name: Publish OSX x64
run: dotnet publish ConsoleAppCore/ConsoleAppCore.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -r osx-x64 --self-contained true -o ${{ github.workspace }}/osx-x64
- name: Zip Folder
run: zip -r -D -j ${{ github.workspace }}/release/osx-x64.zip ${{ github.workspace }}/osx-x64/
- name: Upload OSX X64 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/osx-x64.zip
asset_name: osx-x64.zip
asset_content_type: application/zip
- name: Publish OSX arm64
run: dotnet publish ConsoleAppCore/ConsoleAppCore.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -r osx-arm64 --self-contained true -o ${{ github.workspace }}/osx-arm64
- name: Zip Folder
run: zip -r -D -j ${{ github.workspace }}/release/osx-arm64.zip ${{ github.workspace }}/osx-arm64/
- name: Upload OSX arm64 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/osx-arm64.zip
asset_name: osx-arm64.zip
asset_content_type: application/zip