diff --git a/.github/workflows/build-action.yml b/.github/workflows/build-action.yml new file mode 100644 index 0000000..798bfa8 --- /dev/null +++ b/.github/workflows/build-action.yml @@ -0,0 +1,25 @@ +name: Build + +runs: + using: "composite" + steps: + - uses: actions/setup-dotnet@v2 + + - name: Build + run: dotnet build + + - name: Test + run: dotnet test + + - name: Publish + run: dotnet publish .\DesktopClock\DesktopClock.csproj -o "publish" -c Release -r win-x64 + + - name: Create installer + run: | + dotnet tool install --global wix --version 4.0.3 + wix build Product.wxs -o "publish/Install DesktopClock.msi" + + - uses: actions/upload-artifact@v4 + with: + path: | + publish diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 51eace2..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build - -on: - push: - pull_request: - workflow_call: - -jobs: - build: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-dotnet@v2 - - - name: Build - run: dotnet build - - - name: Test - run: dotnet test - - - name: Publish - run: dotnet publish .\DesktopClock\DesktopClock.csproj -o "publish" -c Release -r win-x64 - - - name: Create installer - run: | - dotnet tool install --global wix --version 4.0.3 - wix build Product.wxs -o "publish/Install DesktopClock.msi" - - - uses: actions/upload-artifact@v4 - with: - path: | - publish diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d3092b4..3701736 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,9 +9,9 @@ jobs: deploy: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: ./.github/workflows/build.yml + - uses: ./.github/workflows/build-action.yml - name: Create GitHub release uses: ncipollo/release-action@v1 diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..a9ce249 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,13 @@ +name: Pipeline + +on: + push: + pull_request: + +jobs: + deploy: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - uses: ./.github/workflows/build-action.yml