Skip to content

Commit ebd45cf

Browse files
Merge pull request #6 from chcg/gha_ci
initial GH action CI
2 parents 287cf32 + fd17976 commit ebd45cf

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
9+
# Maintain dependencies for GitHub Actions
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "monthly"
14+
15+
- package-ecosystem: "nuget"
16+
directory: "/"
17+
schedule:
18+
interval: "monthly"

.github/workflows/CI_build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI_build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: windows-latest
9+
env:
10+
Solution: CompressedFileViewer.sln
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
build_configuration: [Release, Debug]
15+
build_platform: [x64, x86]
16+
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v6
20+
21+
- name: Add msbuild to PATH
22+
uses: microsoft/setup-msbuild@v3
23+
24+
- name: Setup NuGet
25+
uses: nuget/setup-nuget@v4
26+
27+
- name: Setup dotnet for ${{ matrix.build_platform }}
28+
uses: actions/setup-dotnet@v5
29+
with:
30+
dotnet-version: |
31+
8.0.x
32+
architecture: ${{ matrix.build_platform }}
33+
34+
- name: Nuget restore solution
35+
working-directory: .
36+
run: nuget restore $env:Solution
37+
38+
- name: Dotnet restore dependencies
39+
run: dotnet restore $env:Solution --arch ${{ matrix.build_platform }}
40+
41+
- name: MSBuild of plugin dll
42+
run: msbuild $env:Solution /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}"
43+
44+
- uses: olegtarasov/get-tag@v2.1.4
45+
id: tagName
46+
47+
- name: Archive artifacts for ${{ matrix.build_platform }}
48+
if: matrix.build_configuration == 'Release'
49+
uses: actions/upload-artifact@v7
50+
with:
51+
name: CompressedFileViewer_${{ steps.tagName.outputs.tag }}_${{ matrix.build_platform }}.zip
52+
path: CompressedFileViewer\publish\CompressedFileViewer${{ matrix.build_platform }}.zip
53+
54+
- name: Create release on tagging
55+
uses: softprops/action-gh-release@v3
56+
if: startsWith(github.ref, 'refs/tags/')
57+
with:
58+
files: CompressedFileViewer_${{ steps.tagName.outputs.tag }}_${{ matrix.build_platform }}.zip
59+

0 commit comments

Comments
 (0)