Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 7e73240

Browse files
authored
Create betarelease.yml
1 parent 17adc5b commit 7e73240

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

.github/workflows/betarelease.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Publish Beta Release
2+
3+
on:
4+
push:
5+
branches:
6+
- development
7+
8+
jobs:
9+
build:
10+
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
# Install the .NET Core workload
18+
- name: Install .NET Core
19+
uses: actions/setup-dotnet@v1
20+
with:
21+
dotnet-version: 6.0.100
22+
23+
# Nuget
24+
- uses: nuget/setup-nuget@v1
25+
with:
26+
nuget-version: '5.x'
27+
- run: nuget restore Spcode.sln
28+
29+
# Setup MSBuild
30+
- name: Setup MSBuild.exe
31+
uses: microsoft/[email protected]
32+
33+
# Build Spcode
34+
- name: Build Spcode
35+
run: msbuild Spcode.csproj /p:Configuration=Release-Beta /p:langversion=latest
36+
37+
# Build Installer
38+
- name: Build Installer (NSIS)
39+
uses: joncloud/makensis-action@v1
40+
with:
41+
script-file: .\bin\Release\SPCode.nsi
42+
43+
# Compress Portable Version
44+
- name: Compress Portable Version
45+
run: .\bin\Release\Compress.ps1
46+
shell: powershell
47+
48+
# Build Updater
49+
- name: Build Updater
50+
run: msbuild Deploy\SPCodeUpdater\SPCodeUpdater.csproj /p:Configuration=Release /property:langversion=latest
51+
52+
- name: Create Release
53+
id: create_release
54+
uses: actions/create-release@v1
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
with:
58+
tag_name: ${{ github.ref }}
59+
release_name: Release ${{ github.ref }}
60+
draft: false
61+
prerelease: true
62+
63+
64+
- name: Upload Installer
65+
id: upload-installer
66+
uses: actions/upload-release-asset@v1
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
71+
asset_path: .\bin\Release\SPCode.Installer.exe
72+
asset_name: SPCode.Installer.exe
73+
asset_content_type: application/octet-stream
74+
75+
- name: Upload Portable
76+
id: upload-portable
77+
uses: actions/upload-release-asset@v1
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
with:
81+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
82+
asset_path: .\bin\Release\SPCode.Portable.zip
83+
asset_name: SPCode.Portable.zip
84+
asset_content_type: application/zip
85+
86+
- name: Upload Updater
87+
id: upload-updater
88+
uses: actions/upload-release-asset@v1
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
with:
92+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
93+
asset_path: .\Deploy\SpcodeUpdater\bin\Release\SPCodeUpdater.exe
94+
asset_name: SPCodeUpdater.exe
95+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)