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

Commit 32e7552

Browse files
authored
Merge pull request #116 from maxijabase/ongoing
Create beta version of SPCode
2 parents b05b616 + d08f8e6 commit 32e7552

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1374
-459
lines changed

.github/workflows/betarelease.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Publish Beta Release
2+
3+
on:
4+
push:
5+
branches:
6+
- development
7+
8+
jobs:
9+
10+
# Build and release
11+
build:
12+
13+
runs-on: windows-latest
14+
steps:
15+
16+
# Checkout the repository
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
22+
# Fetch latest tag and rev number
23+
- name: Get tag and rev number
24+
id: get-tag-rev
25+
run: |
26+
echo "::set-output name=TAG::$(git describe --match "[0-9].[0-9].[0-9].[0-9]" --tags --abbrev=0)"
27+
echo "::set-output name=REV::$(git rev-list HEAD --count)"
28+
29+
# Install the .NET Core workload
30+
- name: Install .NET Core
31+
uses: actions/setup-dotnet@v1
32+
with:
33+
dotnet-version: 6.0.100
34+
35+
# Nuget
36+
- name: Restore NuGet packages
37+
uses: nuget/setup-nuget@v1
38+
with:
39+
nuget-version: '5.x'
40+
- run: nuget restore Spcode.sln
41+
42+
# Setup MSBuild
43+
- name: Setup MSBuild
44+
uses: microsoft/[email protected]
45+
46+
# Build SPCode
47+
- name: Build SPCode
48+
run: msbuild Spcode.csproj /p:Configuration=Release-Beta /p:langversion=latest
49+
50+
# Build Installer
51+
- name: Build Installer (NSIS)
52+
uses: joncloud/makensis-action@v1
53+
with:
54+
script-file: .\bin\Release-Beta\SPCode.nsi
55+
56+
# Compress Beta Portable Version
57+
- name: Compress Portable Version
58+
run: .\bin\Release-Beta\Compress.ps1
59+
shell: powershell
60+
61+
# Build Updater
62+
- name: Build Updater
63+
run: msbuild Deploy\SPCodeUpdater\SPCodeUpdater.csproj /p:Configuration=Release-Beta /p:langversion=latest
64+
65+
# Create Release
66+
- name: Create Release
67+
id: create_release
68+
uses: actions/create-release@v1
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
with:
72+
tag_name: ${{ steps.get-tag-rev.outputs.TAG }}.beta${{ steps.get-tag-rev.outputs.REV }}
73+
release_name: Release ${{ steps.get-tag-rev.outputs.TAG }}.beta${{ steps.get-tag-rev.outputs.REV }}
74+
draft: false
75+
prerelease: true
76+
77+
# Upload Installer
78+
- name: Upload Installer
79+
id: upload-installer
80+
uses: actions/upload-release-asset@v1
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
upload_url: ${{ steps.create_release.outputs.upload_url }}
85+
asset_path: .\bin\Release-Beta\SPCode.Beta.Installer.exe
86+
asset_name: SPCode.Beta.Installer.exe
87+
asset_content_type: application/octet-stream
88+
89+
# Upload Portable
90+
- name: Upload Portable
91+
id: upload-portable
92+
uses: actions/upload-release-asset@v1
93+
env:
94+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
with:
96+
upload_url: ${{ steps.create_release.outputs.upload_url }}
97+
asset_path: .\bin\Release-Beta\SPCode.Beta.Portable.zip
98+
asset_name: SPCode.Beta.Portable.zip
99+
asset_content_type: application/zip
100+
101+
# Upload Updater
102+
- name: Upload Updater
103+
id: upload-updater
104+
uses: actions/upload-release-asset@v1
105+
env:
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
with:
108+
upload_url: ${{ steps.create_release.outputs.upload_url }}
109+
asset_path: .\Deploy\SpcodeUpdater\bin\Release-Beta\SPCodeUpdater.exe
110+
asset_name: SPCodeUpdater.exe
111+
asset_content_type: application/octet-stream

.github/workflows/compile.yaml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,38 @@ name: Publish Release
22

33
on:
44
push:
5-
tags:
6-
- '*'
5+
branches:
6+
- master
77

88
jobs:
9+
10+
# Build and release
911
build:
1012

1113
runs-on: windows-latest
12-
1314
steps:
15+
16+
# Checkout the repository
1417
- name: Checkout
1518
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
22+
# Fetch latest tag
23+
- name: Get tag
24+
id: get-tag
25+
run: |
26+
echo "::set-output name=TAG::$(git describe --match "[0-9].[0-9].[0-9].[0-9]" --tags --abbrev=0)"
1627
1728
# Install the .NET Core workload
1829
- name: Install .NET Core
1930
uses: actions/setup-dotnet@v1
2031
with:
21-
dotnet-version: 6.0.100-rc.2.21505.57
32+
dotnet-version: 6.0.100
2233

2334
# Nuget
24-
- uses: nuget/setup-nuget@v1
35+
- name: Restore NuGet packages
36+
uses: nuget/setup-nuget@v1
2537
with:
2638
nuget-version: '5.x'
2739
- run: nuget restore Spcode.sln
@@ -30,8 +42,8 @@ jobs:
3042
- name: Setup MSBuild.exe
3143
uses: microsoft/[email protected]
3244

33-
# Build Spcode
34-
- name: Build Spcode
45+
# Build SPCode
46+
- name: Build SPCode
3547
run: msbuild Spcode.csproj /p:Configuration=Release /p:langversion=latest
3648

3749
# Build Installer
@@ -55,8 +67,8 @@ jobs:
5567
env:
5668
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5769
with:
58-
tag_name: ${{ github.ref }}
59-
release_name: Release ${{ github.ref }}
70+
tag_name: ${{ steps.get-tag.outputs.TAG }}
71+
release_name: Release ${{ steps.get-tag.outputs.TAG }}
6072
draft: false
6173
prerelease: false
6274

@@ -67,7 +79,7 @@ jobs:
6779
env:
6880
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6981
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
82+
upload_url: ${{ steps.create_release.outputs.upload_url }}
7183
asset_path: .\bin\Release\SPCode.Installer.exe
7284
asset_name: SPCode.Installer.exe
7385
asset_content_type: application/octet-stream
@@ -78,7 +90,7 @@ jobs:
7890
env:
7991
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8092
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
93+
upload_url: ${{ steps.create_release.outputs.upload_url }}
8294
asset_path: .\bin\Release\SPCode.Portable.zip
8395
asset_name: SPCode.Portable.zip
8496
asset_content_type: application/zip
@@ -89,7 +101,7 @@ jobs:
89101
env:
90102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91103
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
104+
upload_url: ${{ steps.create_release.outputs.upload_url }}
93105
asset_path: .\Deploy\SpcodeUpdater\bin\Release\SPCodeUpdater.exe
94106
asset_name: SPCodeUpdater.exe
95107
asset_content_type: application/octet-stream

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,6 @@ $RECYCLE.BIN/
211211
# IDE FIles
212212
/.idea/
213213
*.iml
214+
App/AssemblyInfo.cs
215+
Resources/Icons/Icon.ico
216+
Resources/Icons/icon256x.png

App/AssemblyInfo.cs

Lines changed: 0 additions & 33 deletions
This file was deleted.

Deploy/AssemblyInfo_Template.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Reflection;
2+
using System.Resources;
3+
using System.Runtime.InteropServices;
4+
5+
[assembly: AssemblyTitle("${PROGRAMNAME}")]
6+
[assembly: AssemblyDescription("SPCode - A lightweight SourcePawn editor")]
7+
[assembly: AssemblyConfiguration("")]
8+
[assembly: AssemblyCompany("SPCode Organization")]
9+
[assembly: AssemblyProduct("${PROGRAMNAME}")]
10+
[assembly: AssemblyCopyright("Copyright © Julien Kluge 2015")]
11+
[assembly: AssemblyTrademark("")]
12+
[assembly: AssemblyCulture("")]
13+
[assembly: NeutralResourcesLanguage("en-US")]
14+
[assembly: ComVisible(false)]
15+
[assembly: Guid("11db2f22-8d7c-4a10-a940-b103e4e3bdf2")]
16+
17+
[assembly: AssemblyVersion("${TAG}")]
18+
[assembly: AssemblyInformationalVersion("${TAG}.beta${REV}")]

Deploy/Compress.ps1

Lines changed: 0 additions & 32 deletions
This file was deleted.

Deploy/Compress_Beta.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
$loc = Get-Location
2+
Set-Location 'bin\Release-Beta\'
3+
$compress = @{
4+
LiteralPath=
5+
"sourcepawn/",
6+
"lysis/",
7+
"SPCode.exe",
8+
"lang_0_spcode.xml",
9+
"GPLv3.txt",
10+
"License.txt"
11+
DestinationPath = "SPCode.Beta.Portable.zip"
12+
13+
}
14+
Compress-Archive -Force @compress
15+
Set-Location $loc

Deploy/Compress_Stable.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
$loc = Get-Location
2+
Set-Location 'bin\Release\'
3+
$compress = @{
4+
LiteralPath=
5+
"sourcepawn/",
6+
"lysis/",
7+
"SPCode.exe",
8+
"lang_0_spcode.xml",
9+
"GPLv3.txt",
10+
"License.txt"
11+
DestinationPath = "SPCode.Portable.zip"
12+
13+
}
14+
Compress-Archive -Force @compress
15+
Set-Location $loc

0 commit comments

Comments
 (0)