Skip to content

Commit a02272e

Browse files
committed
Refactor GitHub action file.
1 parent 52f5f65 commit a02272e

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

‎.github/workflows/dotnet-desktop.yml‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,44 @@ name: Build and Release
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: ["main"]
88

99
permissions:
10-
contents: write # This grants write permissions to the contents scope
10+
contents: write # This grants write permissions to the contents scope
1111

1212
env:
1313
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1414
RELEASE_TAG: "latest_release"
15+
PROJECT_NAME: "HellDivers2OneKeyStratagem"
1516

1617
jobs:
17-
1818
build_and_release:
19-
2019
runs-on: windows-latest
2120

2221
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 0
27-
28-
- name: Build
29-
run: dotnet build --configuration Release HellDivers2OneKeyStratagem.sln
30-
31-
- name: Pack files
32-
run: |
33-
cd bin
34-
7Zip\7za.exe a -r ..\HellDivers2OneKeyStratagem.7z *
35-
cd ..
36-
37-
- name: Delete release and tag
38-
run: gh release delete ${{ env.RELEASE_TAG }} --cleanup-tag -y
39-
continue-on-error: true
40-
41-
- name: Create a new tag and release
42-
run: gh release create ${{ env.RELEASE_TAG }} --generate-notes
43-
44-
- name: Upload pack
45-
run: gh release upload ${{ env.RELEASE_TAG }} HellDivers2OneKeyStratagem.7z --clobber
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
submodules: true
27+
28+
- name: Build
29+
run: dotnet build --configuration Release ${{ env.PROJECT_NAME }}.sln
30+
31+
- name: Pack files
32+
run: |
33+
cd bin
34+
7Zip\7za.exe a -r ..\${{ env.PROJECT_NAME }}.7z *
35+
cd ..
36+
37+
- name: Delete release and tag
38+
run: gh release delete ${{ env.RELEASE_TAG }} --cleanup-tag -y
39+
continue-on-error: true
40+
41+
- name: Create a new tag and release
42+
run: gh release create ${{ env.RELEASE_TAG }} --generate-notes
43+
44+
- name: Upload pack
45+
run: gh release upload ${{ env.RELEASE_TAG }} ${{ env.PROJECT_NAME }}.7z --clobber

0 commit comments

Comments
 (0)