-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
169857d
commit 02726f2
Showing
8 changed files
with
1,096 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Build | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
inputs: | ||
should_release: | ||
description: "Create release?" | ||
required: true | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup MAPI | ||
uses: BadMagic100/setup-hk@v1 | ||
with: | ||
apiPath: API | ||
#dependencyFilePath: CelesteDash/ModDependencies.txt | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
|
||
- name: Install dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build -c Release | ||
|
||
- name: Prepare artifacts for release | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Publish | ||
path: CelesteDash/bin/Publish | ||
release: | ||
needs: | ||
- build | ||
runs-on: windows-latest | ||
# only make a release if we manually request the build - other builds will be handled automatically with a push | ||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.should_release == 'true' | ||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: artifacts | ||
- name: Get build details | ||
id: details | ||
# this assumes that an MSBuild task that writes the SHA256 of the zip file to SHA.txt, and the mod version (usually | ||
# the same as the assembly version) to version.txt. The contents of these files are read to step outputs for use in release | ||
run: | | ||
$sha = Get-Content artifacts/Publish/SHA.txt | ||
$ver = Get-Content artifacts/Publish/VERSION.txt | ||
echo "archiveHash=$sha" >> $env:GITHUB_OUTPUT | ||
echo "buildVersion=$ver" >> $env:GITHUB_OUTPUT | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: false | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true | ||
tag_name: v${{ steps.details.outputs.buildVersion }} | ||
body: | | ||
SHA256: ${{ steps.details.outputs.archiveHash }} | ||
files: | | ||
artifacts/Publish/CelesteDash.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.9.34701.34 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CelesteDash", "CelesteDash\CelesteDash.csproj", "{5D591691-175A-410B-A56A-0A39D8C09BF8}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{2E6DD5B7-9392-4088-B65D-CD5B12562A64}" | ||
ProjectSection(SolutionItems) = preProject | ||
.github\workflows\build.yml = .github\workflows\build.yml | ||
.github\dependabot.yml = .github\dependabot.yml | ||
README.md = README.md | ||
EndProjectSection | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{5D591691-175A-410B-A56A-0A39D8C09BF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5D591691-175A-410B-A56A-0A39D8C09BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5D591691-175A-410B-A56A-0A39D8C09BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5D591691-175A-410B-A56A-0A39D8C09BF8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {7FBE0C97-1359-4E16-9819-529BDBEC6071} | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.