Skip to content

Commit 41cf6f8

Browse files
committed
Use a different indentation in the workflow.
1 parent b722898 commit 41cf6f8

1 file changed

Lines changed: 50 additions & 51 deletions

File tree

.github/workflows/main.yml

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -19,69 +19,68 @@ jobs:
1919
has-tag: ${{ steps.check-tag.outputs.has-tag }}
2020

2121
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v6
24+
with:
25+
fetch-tags: true
26+
persist-credentials: false
2227

23-
- name: Checkout
24-
uses: actions/checkout@v6
25-
with:
26-
fetch-tags: true
27-
persist-credentials: false
28+
- name: Check if commit has tag
29+
if: github.event_name != 'pull_request'
30+
id: check-tag
31+
shell: powershell
32+
run: |
33+
$tag = git tag --points-at HEAD
34+
if ($tag) {
35+
echo "Tag found: $tag"
36+
echo "has-tag=true" >> $env:GITHUB_OUTPUT
37+
} else {
38+
echo "No tag found"
39+
echo "has-tag=false" >> $env:GITHUB_OUTPUT
40+
}
2841
29-
- name: Check if commit has tag
30-
if: github.event_name != 'pull_request'
31-
id: check-tag
32-
run: |
33-
$tag = git tag --points-at HEAD
34-
if ($tag) {
35-
echo "Tag found: $tag"
36-
echo "has-tag=true" >> $env:GITHUB_OUTPUT
37-
} else {
38-
echo "No tag found"
39-
echo "has-tag=false" >> $env:GITHUB_OUTPUT
40-
}
41-
shell: powershell
42+
- name: Setup MSBuild
43+
uses: microsoft/setup-msbuild@v2
4244

43-
- name: Setup MSBuild
44-
uses: microsoft/setup-msbuild@v2
45+
- name: Restore NuGet packages
46+
run: nuget restore MagickViewer/packages.config -PackagesDirectory packages
4547

46-
- name: Restore NuGet packages
47-
run: nuget restore MagickViewer/packages.config -PackagesDirectory packages
48+
- name: Build
49+
run: msbuild MagickViewer.sln /p:Configuration=Release /p:Platform="Any CPU"
4850

49-
- name: Build
50-
run: msbuild MagickViewer.sln /p:Configuration=Release /p:Platform="Any CPU"
51+
- name: Publish
52+
run: msbuild MagickViewer.sln /p:Configuration=Release /p:Platform="Any CPU" /p:PublishClickOnce=true /t:PublishClickOnce
5153

52-
- name: Publish
53-
run: msbuild MagickViewer.sln /p:Configuration=Release /p:Platform="Any CPU" /p:PublishClickOnce=true /t:PublishClickOnce
54+
- name: Sign executables and libraries
55+
uses: ImageMagick/code-signing-action@4d19869732e1cd97bb823ad21ebffb26ad10836c # v1.0.0
56+
with:
57+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
58+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
59+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
60+
directory: ${{ github.workspace }}\MagickViewer\bin\Release\app.publish
61+
files: 'MagickViewer.application'
5462

55-
- name: Sign executables and libraries
56-
uses: ImageMagick/code-signing-action@4d19869732e1cd97bb823ad21ebffb26ad10836c # v1.0.0
57-
with:
58-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
59-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
60-
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
61-
directory: ${{ github.workspace }}\MagickViewer\bin\Release\app.publish
62-
files: 'MagickViewer.application'
63-
64-
- name: Upload artifacts
65-
uses: actions/upload-artifact@v6
66-
with:
67-
name: MagickViewer
68-
path: MagickViewer\bin\Release\app.publish\**
63+
- name: Upload artifacts
64+
uses: actions/upload-artifact@v6
65+
with:
66+
name: MagickViewer
67+
path: MagickViewer\bin\Release\app.publish\**
6968

7069
deploy:
7170
name: Deploy MagickViewer
7271
runs-on: windows-2022
7372
needs: build
7473
if: needs.build.outputs.has-tag == 'true'
7574
steps:
76-
- name: Download artifacts
77-
uses: actions/download-artifact@v7
78-
with:
79-
name: MagickViewer
80-
path: MagickViewer
75+
- name: Download artifacts
76+
uses: actions/download-artifact@v7
77+
with:
78+
name: MagickViewer
79+
path: MagickViewer
8180

82-
- name: Deploy to Azure Web App
83-
uses: azure/webapps-deploy@v3.0.6
84-
with:
85-
app-name: magickviewer
86-
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
87-
package: MagickViewer
81+
- name: Deploy to Azure Web App
82+
uses: azure/webapps-deploy@v3.0.6
83+
with:
84+
app-name: magickviewer
85+
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
86+
package: MagickViewer

0 commit comments

Comments
 (0)