Skip to content

Commit 75aa25e

Browse files
committed
ci: upgrade upload-artifact action to v5
1 parent cc08e59 commit 75aa25e

File tree

1 file changed

+50
-49
lines changed

1 file changed

+50
-49
lines changed

.github/workflows/dotnet.yml

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,57 @@ on:
88

99
jobs:
1010
build:
11-
1211
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: actions/checkout@v2
16-
- name: Setup .NET
17-
uses: actions/setup-dotnet@v1
18-
with:
19-
dotnet-version: 6.0.x
20-
21-
- name: Set outputs
22-
id: vars
23-
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" &&
24-
echo "::set-output name=version_tag::${GITHUB_REF#refs/*/}" &&
25-
echo "::set-output name=solution_name::WineBridge.sln"
26-
27-
- name: Restore dependencies
28-
working-directory: src/
29-
run: dotnet restore ${{ steps.vars.outputs.solution_name }}
30-
31-
- name: Publish
32-
working-directory: src/WineBridge
33-
run: dotnet publish --no-restore -c Release --runtime win-x86 --self-contained true
34-
/p:PublishSingleFile=true
35-
/p:FileVersion="${{ steps.vars.outputs.version_tag }}"
36-
/p:Version="${{ steps.vars.outputs.version_tag }}"
37-
/p:AssemblyVersion="${{ steps.vars.outputs.version_tag }}"
38-
--version-suffix "-${{ steps.vars.outputs.sha_short }}"
39-
40-
- name: Upload Artifact
41-
uses: actions/upload-artifact@v2
42-
with:
14+
- uses: actions/checkout@v2
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: 6.0.x
19+
20+
- name: Set outputs
21+
id: vars
22+
run:
23+
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" &&
24+
echo "::set-output name=version_tag::${GITHUB_REF#refs/*/}" &&
25+
echo "::set-output name=solution_name::WineBridge.sln"
26+
27+
- name: Restore dependencies
28+
working-directory: src/
29+
run: dotnet restore ${{ steps.vars.outputs.solution_name }}
30+
31+
- name: Publish
32+
working-directory: src/WineBridge
33+
run:
34+
dotnet publish --no-restore -c Release --runtime win-x86 --self-contained true
35+
/p:PublishSingleFile=true
36+
/p:FileVersion="${{ steps.vars.outputs.version_tag }}"
37+
/p:Version="${{ steps.vars.outputs.version_tag }}"
38+
/p:AssemblyVersion="${{ steps.vars.outputs.version_tag }}"
39+
--version-suffix "-${{ steps.vars.outputs.sha_short }}"
40+
41+
- name: Upload Artifact
42+
uses: actions/upload-artifact@v5
43+
with:
44+
working-directory: src/WineBridge/bin/Release/net6.0/win-x86/publish
45+
name: WineBridge-${{ steps.vars.outputs.sha_short }}
46+
path: WineBridge.exe
47+
48+
- name: Package
4349
working-directory: src/WineBridge/bin/Release/net6.0/win-x86/publish
44-
name: WineBridge-${{ steps.vars.outputs.sha_short }}
45-
path: WineBridge.exe
46-
47-
- name: Package
48-
working-directory: src/WineBridge/bin/Release/net6.0/win-x86/publish
49-
run: |
50-
echo ${{ steps.vars.outputs.version_tag }} >> VERSION
51-
tar cJvf WineBridge-${{ steps.vars.outputs.sha_short }}.tar.xz WineBridge.exe VERSION
52-
mv WineBridge-${{ steps.vars.outputs.sha_short }}.tar.xz /tmp/WineBridge-${{ steps.vars.outputs.sha_short }}.tar.xz
53-
54-
# Release packages
55-
# --------------------------------------
56-
- uses: "marvinpinto/action-automatic-releases@latest"
57-
with:
58-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
59-
draft: false
60-
prerelease: false
61-
automatic_release_tag: ${{ steps.vars.outputs.version_tag }}
62-
title: ${{ steps.vars.outputs.version_tag }}
63-
files: /tmp/WineBridge-${{ steps.vars.outputs.sha_short }}.tar.xz
50+
run: |
51+
echo ${{ steps.vars.outputs.version_tag }} >> VERSION
52+
tar cJvf WineBridge-${{ steps.vars.outputs.sha_short }}.tar.xz WineBridge.exe VERSION
53+
mv WineBridge-${{ steps.vars.outputs.sha_short }}.tar.xz /tmp/WineBridge-${{ steps.vars.outputs.sha_short }}.tar.xz
54+
55+
# Release packages
56+
# --------------------------------------
57+
- uses: "marvinpinto/action-automatic-releases@latest"
58+
with:
59+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
60+
draft: false
61+
prerelease: false
62+
automatic_release_tag: ${{ steps.vars.outputs.version_tag }}
63+
title: ${{ steps.vars.outputs.version_tag }}
64+
files: /tmp/WineBridge-${{ steps.vars.outputs.sha_short }}.tar.xz

0 commit comments

Comments
 (0)