Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented a new launcher and autoupdater #404

Merged
merged 43 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
421b6bb
Added Velopack project and new auto updater
leMicin Dec 17, 2024
bc13ea1
Added velopack build pipelines
leMicin Dec 17, 2024
8897ede
Updated velopack pipeline
leMicin Dec 17, 2024
c5f9703
Updated beta version number
leMicin Dec 17, 2024
e56226c
Updated build name
leMicin Dec 17, 2024
342d203
Renamed the workflows
leMicin Dec 17, 2024
42ec051
Merge remote-tracking branch 'origin/main' into feature/velopack
leMicin Dec 18, 2024
9fd9550
Moved VelopackApp.Build().Run() so the build can work
leMicin Dec 18, 2024
6070f95
Updated beta workflow
leMicin Dec 18, 2024
87e06ed
Remove self-contained
leMicin Dec 18, 2024
331bab3
Restored original command
leMicin Dec 18, 2024
6dcef80
Update beta.yml
leMicin Dec 18, 2024
db36c1f
Improved update check
leMicin Dec 20, 2024
622b478
Merge remote-tracking branch 'origin/feature/velopack' into feature/v…
leMicin Dec 20, 2024
959c62e
Merge remote-tracking branch 'origin/main' into feature/velopack
leMicin Dec 20, 2024
aaa7fbc
Fixes after merge from main
leMicin Dec 20, 2024
2c3787b
Merge branch 'main' into feature/velopack
leMicin Dec 25, 2024
55f64c2
Renamed project
leMicin Dec 25, 2024
7d85522
Moved project and update files to the updater project
leMicin Dec 25, 2024
485f9f9
Moved the new launcher text to resources
leMicin Dec 25, 2024
31a4751
Merge remote-tracking branch 'origin/main' into feature/velopack
leMicin Dec 25, 2024
9d98d30
Updated workflows
leMicin Dec 25, 2024
0d4fe90
Updated workflows
leMicin Dec 25, 2024
734245d
Updated workflows
leMicin Dec 25, 2024
b3fe300
Update workflows
leMicin Dec 25, 2024
32307f0
Updated workflows
leMicin Dec 26, 2024
77e09f6
Updated workflows
leMicin Dec 26, 2024
14c0c5d
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
leMicin Dec 26, 2024
51eb48e
Updated workflows
leMicin Dec 26, 2024
b236ba8
Updated workflows
leMicin Dec 26, 2024
c5c7f13
Updated workflows
leMicin Dec 26, 2024
1ddf169
Updated workflows
leMicin Dec 26, 2024
9e00cac
Updated workflows
leMicin Dec 26, 2024
66c47af
Removed clickonce tasks
leMicin Dec 26, 2024
fcbfec6
Updated workflows
leMicin Dec 26, 2024
adce5d7
Removed download instructions from the release assets
leMicin Dec 26, 2024
8c19f09
Merge remote-tracking branch 'origin/main' into feature/velopack
leMicin Dec 27, 2024
5447fed
Added test label to the tray
leMicin Dec 28, 2024
7016494
Updated velopack version
leMicin Dec 28, 2024
27009d7
Include pre releases in version check
leMicin Dec 28, 2024
25ecede
Added back the nupkg asset required for the update
leMicin Dec 28, 2024
6350bb2
Added beta text for test
leMicin Dec 28, 2024
1c5e012
Removed beta text
leMicin Dec 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 82 additions & 4 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Velopack Beta
name: Beta

on:
push:
Expand All @@ -22,12 +22,90 @@ jobs:
# Get the current date
$DATE = Get-Date -Format "yyyy.Md"

# Get the current time in hours and minutes (24-hour format)
$TIME = Get-Date -Format "Hmm"

# Get the current hour and minute without leading zero for the hour
# Get the current hour and minute
$HOUR = [int](Get-Date -Format "HH") # Convert hour to integer to strip any leading zero

# If the hour is 0 (midnight), set it to an empty string
if ($HOUR -eq 0) {
$HOUR = ''
}

$MINUTE = Get-Date -Format "mm" # Keep minutes as-is

# Construct the time, omitting hour if it's empty
$TIME = "$HOUR$MINUTE"

# Construct the version using DATE and TIME
$VERSION = "$DATE.$TIME"
Write-Output "Generated version: $VERSION"

# Export version as an output
echo "version=$VERSION" >> $env:GITHUB_OUTPUT

- name: Version - Update project files
uses: vers-one/[email protected]
with:
file: "src/**/*.csproj"
version: ${{ steps.version.outputs.version }}

- name: Release - Delete unpublished
uses: hugo19941994/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Release - Notes
id: release
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: 'Sidekick v${{ steps.version.outputs.version }}'
tag: 'v${{ steps.version.outputs.version }}'
version: 'v${{ steps.version.outputs.version }}'
publish: false
prerelease: true

- name: Environment - Build Number
uses: myci-actions/export-env-var@1
with:
name: BUILD_NUMBER
value: ${{ steps.version.outputs.version }}

- name: Environment - Github Token
uses: myci-actions/export-env-var@1
with:
name: GITHUB_TOKEN
value: ${{ github.token }}

- name: .NET - Setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.x

- name: .NET - Tests
shell: pwsh
run: |
dotnet restore
dotnet build --no-restore
dotnet test --no-build --verbosity normal

- name: .NET - Publish
shell: pwsh
run: |
$version = "${{ steps.version.outputs.version }}"
Write-Output "Version: $version"

dotnet publish src/Sidekick.Protocol/Sidekick.Protocol.csproj -p:PublishProfile=Build
dotnet publish src/Sidekick.Wpf/Sidekick.Wpf.csproj -c Release --self-contained true -r win-x64 -o ./Publish

- name: Velopack
shell: pwsh
run: |
$version = "${{ steps.version.outputs.version }}"
Write-Output "Version: $version"

dotnet tool install -g vpk
vpk download github --repoUrl https://github.com/Sidekick-Poe/Sidekick --channel windows-beta
vpk pack --packId Sidekick --packVersion $version --packDir Publish --channel windows-beta
vpk upload github --repoUrl https://github.com/Sidekick-Poe/Sidekick --channel windows-beta --pre --merge --releaseName "Sidekick v$version" --tag v$version --token ${{ github.token }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: WPF Beta
name: ClickOnce Beta

on:
push:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Build - Sidekick.Protocol
run: dotnet publish src/Sidekick.Protocol/Sidekick.Protocol.csproj -p:PublishProfile=Build

- name: Build - Sidekick.Wpf
- name: ClickOnce - Build
shell: pwsh
run: |
$version = "${{ steps.version.outputs.version }}"
Expand All @@ -82,18 +82,18 @@ jobs:
& $msBuildPath Sidekick.Wpf.csproj /target:Publish /property:PublishProfile=ClickOnceBeta /property:ApplicationVersion=$version
Pop-Location

- name: Git - Setup
- name: ClickOnce - Git Setup
run: |
git config --global url."https://user:${{ secrets.GITHUB_TOKEN }}@github".insteadOf https://github
git config --global user.name github-actions
git config --global user.email [email protected]

- name: Git - Setup SSH
- name: ClickOnce - Git Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_BETA_KEY }}

- name: Git - Push to repository
- name: ClickOnce - Git Push
shell: pwsh
run: |
$deployRepository = "[email protected]:Sidekick-Poe/Sidekick-Beta.git"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: WPF Release
name: ClickOnce Release

on:
workflow_dispatch:
Expand Down Expand Up @@ -47,17 +47,6 @@ jobs:
name: GITHUB_TOKEN
value: ${{ github.token }}

- name: Release - Notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: 'Release v${{ steps.version.outputs.version }}'
tag: 'v${{ steps.version.outputs.version }}'
version: 'v${{ steps.version.outputs.version }}'
publish: false
prerelease: false

- name: .NET - Setup
uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -130,71 +119,3 @@ jobs:
} finally {
Pop-Location
}

- name: Zip - Build
shell: pwsh
run: |
$version = "${{ steps.version.outputs.version }}"
Write-Output "Version: $version"

# Define the publish path
$publishPath = "bin/zip-publish"

# Remove existing files if the folder exists
if (Test-Path -Path $publishPath) {
Write-Output "Removing existing files from $publishPath..."
Remove-Item -Path $publishPath -Recurse -Force
}

# Create the folder if it doesn't exist
if (!(Test-Path -Path $publishPath)) {
New-Item -ItemType Directory -Force -Path $publishPath | Out-Null
Write-Output "$publishPath created"
}

# Find MSBuild.
$msBuildPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe `
-prerelease | Select-Object -First 1

Push-Location "src/Sidekick.Wpf"

# Run the build command with a self-contained mode
& $msBuildPath Sidekick.Wpf.csproj `
/target:Publish `
/property:PublishDir=$publishPath\ `
/property:SelfContained=true `
/property:ApplicationVersion=$version

Pop-Location

- name: Zip - Archive
shell: pwsh
run: |
$publishPath = "src/Sidekick.Wpf/bin/zip-publish"
$zipFilePath = "dist/Sidekick_v${{ steps.version.outputs.version }}.zip"
if (Test-Path -Path $zipFilePath) {
Remove-Item -Path $zipFilePath -Force
}
Compress-Archive -Path $publishPath\* -DestinationPath $zipFilePath
Write-Host "Files zipped successfully to $zipFilePath"

- name: Release - Asset
uses: xresloader/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
file: 'download-instructions.txt'
tag_name: 'v${{ steps.version.outputs.version }}'
draft: true
verbose: true
overwrite: true

- name: Release - Zip
uses: xresloader/[email protected]
with:
file: 'dist/Sidekick_v${{ steps.version.outputs.version }}.zip'
tag_name: 'v${{ steps.version.outputs.version }}'
draft: true
verbose: true
overwrite: true
107 changes: 107 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Beta

on:
workflow_dispatch:

jobs:
beta:
runs-on: windows-latest

steps:
- name: Git - Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Version
id: version
run: |
# Get the current date
$DATE = Get-Date -Format "yyyy.Md"

# Get the current hour and minute without leading zero for the hour
# Get the current hour and minute
$HOUR = [int](Get-Date -Format "HH") # Convert hour to integer to strip any leading zero

# If the hour is 0 (midnight), set it to an empty string
if ($HOUR -eq 0) {
$HOUR = ''
}

$MINUTE = Get-Date -Format "mm" # Keep minutes as-is

# Construct the time, omitting hour if it's empty
$TIME = "$HOUR$MINUTE"

# Construct the version using DATE and TIME
$VERSION = "$DATE.$TIME"
Write-Output "Generated version: $VERSION"

# Export version as an output
echo "version=$VERSION" >> $env:GITHUB_OUTPUT

- name: Version - Update project files
uses: vers-one/[email protected]
with:
file: "src/**/*.csproj"
version: ${{ steps.version.outputs.version }}

- name: Release - Delete unpublished
uses: hugo19941994/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Release - Notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: 'Sidekick v${{ steps.version.outputs.version }}'
tag: 'v${{ steps.version.outputs.version }}'
version: 'v${{ steps.version.outputs.version }}'
publish: false
prerelease: false

- name: Environment - Build Number
uses: myci-actions/export-env-var@1
with:
name: BUILD_NUMBER
value: ${{ steps.version.outputs.version }}

- name: Environment - Github Token
uses: myci-actions/export-env-var@1
with:
name: GITHUB_TOKEN
value: ${{ github.token }}

- name: .NET - Setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.x

- name: .NET - Tests
shell: pwsh
run: |
dotnet restore
dotnet build --no-restore
dotnet test --no-build --verbosity normal

- name: .NET - Publish
shell: pwsh
run: |
$version = "${{ steps.version.outputs.version }}"
Write-Output "Version: $version"

dotnet publish src/Sidekick.Protocol/Sidekick.Protocol.csproj -p:PublishProfile=Build
dotnet publish src/Sidekick.Wpf/Sidekick.Wpf.csproj -c Release --self-contained true -r win-x64 -o ./Publish

- name: Velopack
shell: pwsh
run: |
$version = "${{ steps.version.outputs.version }}"
Write-Output "Version: $version"

dotnet tool install -g vpk
vpk download github --repoUrl https://github.com/Sidekick-Poe/Sidekick --channel windows-stable
vpk pack --packId Sidekick --packVersion $version --packDir Publish --channel windows-stable
vpk upload github --repoUrl https://github.com/Sidekick-Poe/Sidekick --channel windows-stable --merge --releaseName "Sidekick v$version" --tag v$version${{ github.token }}
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
# [![](https://sidekick-poe.github.io/assets/images/orb_exalted.png)](#) Sidekick

[![Open Website](https://img.shields.io/badge/website-6b6ebe?style=flat-square)](https://sidekick-poe.github.io/) [![Download](https://img.shields.io/badge/download-00BCD4?style=flat-square)](https://sidekick-poe.github.io/) [![](https://img.shields.io/github/v/release/Sidekick-Poe/Sidekick?style=flat-square)](https://github.com/Sidekick-Poe/Sidekick/releases) [![Download Statistics](https://img.shields.io/github/downloads-pre/Sidekick-Poe/Sidekick/latest/total?style=flat-square&color=15803d)](https://tooomm.github.io/github-release-stats/?username=Sidekick-Poe&repository=Sidekick) [![Download Statistics](https://img.shields.io/github/downloads-pre/Sidekick-Poe/Sidekick/total?style=flat-square&color=22c55e)](https://tooomm.github.io/github-release-stats/?username=Sidekick-Poe&repository=Sidekick) [![](https://img.shields.io/discord/664252463188279300?color=%23738AD6&label=Discord&style=flat-square)](https://discord.gg/H4bg4GQ)
[![](https://img.shields.io/github/v/release/Sidekick-Poe/Sidekick?style=flat-square)](https://github.com/Sidekick-Poe/Sidekick/releases/latest) [![Download Statistics](https://img.shields.io/github/downloads-pre/Sidekick-Poe/Sidekick/latest/total?style=flat-square&color=15803d)](https://tooomm.github.io/github-release-stats/?username=Sidekick-Poe&repository=Sidekick) [![Download Statistics](https://img.shields.io/github/downloads-pre/Sidekick-Poe/Sidekick/total?style=flat-square&color=22c55e)](https://tooomm.github.io/github-release-stats/?username=Sidekick-Poe&repository=Sidekick) [![](https://img.shields.io/discord/664252463188279300?color=%23738AD6&label=Discord&style=flat-square)](https://discord.gg/H4bg4GQ)

A Path of Exile companion tool. Price check items, check for dangerous map modifiers, and more!

[![Website](https://img.shields.io/badge/Website_and_Download-6b6ebe?style=for-the-badge)](https://sidekick-poe.github.io/)
[![Website](https://img.shields.io/badge/Website-6b6ebe?style=for-the-badge)](https://sidekick-poe.github.io/) [![Website](https://img.shields.io/badge/Download-00BCD4?style=for-the-badge)](https://github.com/Sidekick-Poe/Sidekick/releases/latest)

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/sidekickpoe)

## Path of Exile 2
Sidekick now supports Path of Exile 2, and of course still supports Path of Exile 1.

## Development
To run the code:

We accept most PR and ideas. If you want a feature included, create an issue and we will discuss it. We are also available on [Discord](https://discord.gg/H4bg4GQ).
#### Running the code:
1. Install **.NET SDK**
2. Install **NPM** (for the stylesheets)
2. Install **Node** and **NPM** (for the stylesheets)
3. Clone the repository
4. Open **.sln** with **Visual Studio 2022** or open the folder with **Visual Studio Code**
5. Choose to run **WPF** (vs2022 only) or **Web** version. Can also be done with **dotnet CLI**

The interface is done in Blazor, running in a webview2 provided by WPF. For Linux, you can run the web project in your browser.

We accept most PR and ideas. If you want a feature included, create an issue and we will discuss it.
4. Open **.sln** with your IDE of choice. Recommended IDEs are: **Visual Studio 2022**, **Rider** or **Visual Studio Code**
5. Run the **WPF** project (VS2022 or Rider) or **Web** project. Can also be done with **dotnet CLI**

We are also available on [Discord](https://discord.gg/H4bg4GQ).
#### Implementation Notes
The application is a web application that is running inside a WebView2 provided by WPF. Development can also be done using the Web project.

## Notice
This product isn't affiliated with or endorsed by Grinding Gear Games in any way.
Expand Down
Loading
Loading