Skip to content

Commit 953c2c3

Browse files
committed
Release Process
1 parent c5e7f3a commit 953c2c3

File tree

2 files changed

+42
-24
lines changed

2 files changed

+42
-24
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ on:
1010
env:
1111
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
1212
DOTNET_NOLOGO: true
13-
VERSION: '${{ inputs.version }}'
13+
GITHUB_ACTIONS: true
14+
VERSION: ${{ inputs.version }}
1415
PKG_DIR: ${{ github.workspace}}/nuget
1516

1617
jobs:
1718
create_tag:
18-
name: "Create Tag"
19+
name: Create Tag
1920
runs-on: ubuntu-latest
2021
steps:
2122
- uses: actions/checkout@v4
@@ -29,7 +30,10 @@ jobs:
2930
tag_prefix: ''
3031

3132
build_test_pack:
33+
name: Build, Test & Pack
3234
runs-on: ${{ matrix.os }}
35+
needs:
36+
- create_tag
3337
strategy:
3438
matrix:
3539
os: [windows-latest]
@@ -41,7 +45,7 @@ jobs:
4145
ref: ${{ format('{0}', inputs.version) }}
4246

4347
- name: Setup .NET
44-
uses: actions/setup-dotnet@v4
48+
uses: actions/setup-dotnet@v5
4549
with:
4650
dotnet-version: 10.0.x
4751

@@ -57,27 +61,36 @@ jobs:
5761
- name: Pack
5862
run: dotnet pack /p:Version=${{ env.VERSION }} --no-build --output ${{ env.PKG_DIR }}
5963

60-
- uses: actions/upload-artifact@v4
64+
- uses: actions/upload-artifact@v6
6165
with:
62-
name: Package
66+
name: SlangShaderSharp ${{ env.VERSION }}
6367
if-no-files-found: error
64-
path: ${{ env.PKG_DIR }}/*.nupkg
68+
path: |
69+
${{ env.PKG_DIR }}/*.nupkg
70+
${{ env.PKG_DIR }}/*.snupkg
6571
66-
- uses: actions/upload-artifact@v4
67-
with:
68-
name: Symbols
69-
if-no-files-found: error
70-
path: ${{ env.PKG_DIR }}/*.snupkg
71-
72-
#create_release:
73-
# needs:
74-
# - build
75-
# if: |
76-
# always() &&
77-
# (needs.build.result == 'success' || needs.build.result == 'skipped')
78-
# runs-on: ubuntu-latest
79-
# steps:
80-
# - name: Download Binaries
81-
# uses: actions/download-artifact@v4
72+
73+
create_release:
74+
needs:
75+
- build
76+
if: |
77+
always() &&
78+
(needs.build.result == 'success' || needs.build.result == 'skipped')
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Download Binaries
82+
uses: actions/download-artifact@v7
83+
84+
- name: Create Release
85+
uses: softprops/action-gh-release@v2
86+
with:
87+
tag_name: ${{ inputs.version }}
88+
files: |
89+
*.nupkg
90+
*.snupkg
91+
name: SlangShaderSharp ${{ inputs.version }}
92+
generate_release_notes: true
93+
draft: false
94+
prerelease: false
8295

8396

.github/workflows/test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
pull_request:
77
branches: [ "main" ]
88

9+
env:
10+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
11+
DOTNET_NOLOGO: true
12+
GITHUB_ACTIONS: true
13+
914
jobs:
1015
build:
1116
runs-on: ${{ matrix.os }}
@@ -17,7 +22,7 @@ jobs:
1722
- uses: actions/checkout@v4
1823

1924
- name: Setup .NET
20-
uses: actions/setup-dotnet@v4
25+
uses: actions/setup-dotnet@v5
2126
with:
2227
dotnet-version: 10.0.x
2328

@@ -28,4 +33,4 @@ jobs:
2833
run: dotnet build --configuration Release --no-restore
2934

3035
- name: Test
31-
run: --configuration Release --no-build --verbosity normal
36+
run: dotnet test --configuration Release --no-build --verbosity normal

0 commit comments

Comments
 (0)