Skip to content

Commit 4196dd3

Browse files
authored
Merge pull request #89 from mrexodia/github-actions
Update github actions
2 parents 4c7cb49 + 32d3315 commit 4196dd3

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
name: Visual Studio
2-
3-
on: [push, pull_request]
4-
5-
jobs:
6-
build:
7-
# Skip building pull requests from the same repository
8-
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
9-
runs-on: windows-2019
10-
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v2
13-
14-
- name: Add msbuild to PATH
15-
uses: microsoft/setup-msbuild@v1.0.2
16-
17-
- name: Build
18-
run: |
19-
msbuild.exe ${{ github.event.repository.name }}.sln /m /verbosity:minimal /t:Rebuild /p:Configuration=Release /p:Platform=x64
20-
msbuild.exe ${{ github.event.repository.name }}.sln /m /verbosity:minimal /t:Rebuild /p:Configuration=Release /p:Platform=Win32
21-
./release.bat
22-
23-
- uses: actions/upload-artifact@v2
24-
with:
25-
name: ${{ github.event.repository.name }}-${{ github.sha }}
26-
path: bin/
27-
28-
- name: Compress artifacts
29-
uses: papeloto/action-zip@v1
30-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
31-
with:
32-
files: bin/
33-
dest: ${{ github.event.repository.name }}-${{ github.sha }}.zip
34-
35-
- name: Release
36-
uses: softprops/action-gh-release@v1
37-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
38-
with:
39-
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-pre') }}
40-
files: ${{ github.event.repository.name }}-${{ github.sha }}.zip
41-
env:
1+
name: Visual Studio
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
# Skip building pull requests from the same repository
8+
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
9+
runs-on: windows-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Add msbuild to PATH
15+
uses: microsoft/setup-msbuild@v2
16+
17+
- name: Build
18+
run: |
19+
msbuild.exe ${{ github.event.repository.name }}.sln /m /verbosity:minimal /t:Rebuild /p:Configuration=Release /p:Platform=x64
20+
msbuild.exe ${{ github.event.repository.name }}.sln /m /verbosity:minimal /t:Rebuild /p:Configuration=Release /p:Platform=Win32
21+
./release.bat
22+
23+
- uses: actions/upload-artifact@v4
24+
with:
25+
name: ${{ github.event.repository.name }}-${{ github.sha }}
26+
path: bin/
27+
28+
- name: Compress artifacts
29+
uses: vimtor/action-zip@26a249fb00d43ca98dad77a4b3838025fc226aa1 # v1.1
30+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
31+
with:
32+
files: bin/
33+
dest: ${{ github.event.repository.name }}-${{ github.sha }}.zip
34+
35+
- name: Release
36+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
37+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
38+
with:
39+
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-pre') }}
40+
files: ${{ github.event.repository.name }}-${{ github.sha }}.zip
41+
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)