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

Commit

Permalink
Merge pull request #116 from maxijabase/ongoing
Browse files Browse the repository at this point in the history
Create beta version of SPCode
  • Loading branch information
maxijabase authored Dec 26, 2021
2 parents b05b616 + d08f8e6 commit 32e7552
Show file tree
Hide file tree
Showing 55 changed files with 1,374 additions and 459 deletions.
111 changes: 111 additions & 0 deletions .github/workflows/betarelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Publish Beta Release

on:
push:
branches:
- development

jobs:

# Build and release
build:

runs-on: windows-latest
steps:

# Checkout the repository
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

# Fetch latest tag and rev number
- name: Get tag and rev number
id: get-tag-rev
run: |
echo "::set-output name=TAG::$(git describe --match "[0-9].[0-9].[0-9].[0-9]" --tags --abbrev=0)"
echo "::set-output name=REV::$(git rev-list HEAD --count)"
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100

# Nuget
- name: Restore NuGet packages
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
- run: nuget restore Spcode.sln

# Setup MSBuild
- name: Setup MSBuild
uses: microsoft/[email protected]

# Build SPCode
- name: Build SPCode
run: msbuild Spcode.csproj /p:Configuration=Release-Beta /p:langversion=latest

# Build Installer
- name: Build Installer (NSIS)
uses: joncloud/makensis-action@v1
with:
script-file: .\bin\Release-Beta\SPCode.nsi

# Compress Beta Portable Version
- name: Compress Portable Version
run: .\bin\Release-Beta\Compress.ps1
shell: powershell

# Build Updater
- name: Build Updater
run: msbuild Deploy\SPCodeUpdater\SPCodeUpdater.csproj /p:Configuration=Release-Beta /p:langversion=latest

# Create Release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-tag-rev.outputs.TAG }}.beta${{ steps.get-tag-rev.outputs.REV }}
release_name: Release ${{ steps.get-tag-rev.outputs.TAG }}.beta${{ steps.get-tag-rev.outputs.REV }}
draft: false
prerelease: true

# Upload Installer
- name: Upload Installer
id: upload-installer
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\bin\Release-Beta\SPCode.Beta.Installer.exe
asset_name: SPCode.Beta.Installer.exe
asset_content_type: application/octet-stream

# Upload Portable
- name: Upload Portable
id: upload-portable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\bin\Release-Beta\SPCode.Beta.Portable.zip
asset_name: SPCode.Beta.Portable.zip
asset_content_type: application/zip

# Upload Updater
- name: Upload Updater
id: upload-updater
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\Deploy\SpcodeUpdater\bin\Release-Beta\SPCodeUpdater.exe
asset_name: SPCodeUpdater.exe
asset_content_type: application/octet-stream
64 changes: 0 additions & 64 deletions .github/workflows/compile.yaml

This file was deleted.

36 changes: 24 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,38 @@ name: Publish Release

on:
push:
tags:
- '*'
branches:
- master

jobs:

# Build and release
build:

runs-on: windows-latest

steps:

# Checkout the repository
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

# Fetch latest tag
- name: Get tag
id: get-tag
run: |
echo "::set-output name=TAG::$(git describe --match "[0-9].[0-9].[0-9].[0-9]" --tags --abbrev=0)"
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100-rc.2.21505.57
dotnet-version: 6.0.100

# Nuget
- uses: nuget/setup-nuget@v1
- name: Restore NuGet packages
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
- run: nuget restore Spcode.sln
Expand All @@ -30,8 +42,8 @@ jobs:
- name: Setup MSBuild.exe
uses: microsoft/[email protected]

# Build Spcode
- name: Build Spcode
# Build SPCode
- name: Build SPCode
run: msbuild Spcode.csproj /p:Configuration=Release /p:langversion=latest

# Build Installer
Expand All @@ -55,8 +67,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ steps.get-tag.outputs.TAG }}
release_name: Release ${{ steps.get-tag.outputs.TAG }}
draft: false
prerelease: false

Expand All @@ -67,7 +79,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\bin\Release\SPCode.Installer.exe
asset_name: SPCode.Installer.exe
asset_content_type: application/octet-stream
Expand All @@ -78,7 +90,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\bin\Release\SPCode.Portable.zip
asset_name: SPCode.Portable.zip
asset_content_type: application/zip
Expand All @@ -89,7 +101,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\Deploy\SpcodeUpdater\bin\Release\SPCodeUpdater.exe
asset_name: SPCodeUpdater.exe
asset_content_type: application/octet-stream
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,6 @@ $RECYCLE.BIN/
# IDE FIles
/.idea/
*.iml
App/AssemblyInfo.cs
Resources/Icons/Icon.ico
Resources/Icons/icon256x.png
33 changes: 0 additions & 33 deletions App/AssemblyInfo.cs

This file was deleted.

18 changes: 18 additions & 0 deletions Deploy/AssemblyInfo_Template.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("${PROGRAMNAME}")]
[assembly: AssemblyDescription("SPCode - A lightweight SourcePawn editor")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("SPCode Organization")]
[assembly: AssemblyProduct("${PROGRAMNAME}")]
[assembly: AssemblyCopyright("Copyright © Julien Kluge 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: Guid("11db2f22-8d7c-4a10-a940-b103e4e3bdf2")]

[assembly: AssemblyVersion("${TAG}")]
[assembly: AssemblyInformationalVersion("${TAG}.beta${REV}")]
32 changes: 0 additions & 32 deletions Deploy/Compress.ps1

This file was deleted.

15 changes: 15 additions & 0 deletions Deploy/Compress_Beta.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$loc = Get-Location
Set-Location 'bin\Release-Beta\'
$compress = @{
LiteralPath=
"sourcepawn/",
"lysis/",
"SPCode.exe",
"lang_0_spcode.xml",
"GPLv3.txt",
"License.txt"
DestinationPath = "SPCode.Beta.Portable.zip"

}
Compress-Archive -Force @compress
Set-Location $loc
15 changes: 15 additions & 0 deletions Deploy/Compress_Stable.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$loc = Get-Location
Set-Location 'bin\Release\'
$compress = @{
LiteralPath=
"sourcepawn/",
"lysis/",
"SPCode.exe",
"lang_0_spcode.xml",
"GPLv3.txt",
"License.txt"
DestinationPath = "SPCode.Portable.zip"

}
Compress-Archive -Force @compress
Set-Location $loc
Loading

0 comments on commit 32e7552

Please sign in to comment.