Skip to content

Commit 9cc4de1

Browse files
fix yaml syntax
1 parent 3a44bc1 commit 9cc4de1

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,45 @@ name: Release to NuGet
33
on:
44
push:
55
tags:
6-
- 'v*.*.*' # Matches stable versions like v1.2.3
7-
- 'v*.*.*-*' # Matches pre-release versions like v2.0.1-beta
6+
- "v*.*.*" # Matches stable versions like v1.2.3
7+
- "v*.*.*-*" # Matches pre-release versions like v2.0.1-beta
88

99
jobs:
1010
build-and-release:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v4
16-
17-
- name: Setup .NET
18-
uses: actions/setup-dotnet@v4
19-
with:
20-
dotnet-version: '8.0.x' # Adjust to your .NET version
21-
22-
- name: Restore dependencies
23-
run: dotnet restore ./src/DataStax.AstraDB.DataApi/
24-
25-
- name: Build
26-
run: dotnet build ./src/DataStax.AstraDB.DataApi/ --configuration Release --no-restore
27-
28-
- name: Pack
29-
run: dotnet pack ./src/DataStax.AstraDB.DataApi/ --configuration Release --no-build --output nupkgs -p:Version=${{ env.PACKAGE_VERSION }}
30-
env:
31-
PACKAGE_VERSION: ${{ replace(github.ref_name, 'v', '') }}
32-
33-
# - name: Push to NuGet
34-
# run: dotnet nuget push nupkgs/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
35-
# env:
36-
# NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
37-
38-
- name: Dry-run NuGet push
39-
run: echo "Would run: dotnet nuget push nupkgs/*.nupkg --api-key [REDACTED] --source https://api.nuget.org/v3/index.json"
40-
41-
- name: Upload NuGet package as artifact
42-
uses: actions/upload-artifact@v4
43-
with:
44-
name: nuget-package
45-
path: nupkgs/*.nupkg
46-
retention-days: 1
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: "8.0.x" # Adjust to your .NET version
21+
22+
- name: Restore dependencies
23+
run: dotnet restore ./src/DataStax.AstraDB.DataApi/
24+
25+
- name: Build
26+
run: dotnet build ./src/DataStax.AstraDB.DataApi/ --configuration Release --no-restore
27+
28+
- name: Pack
29+
run: dotnet pack ./src/DataStax.AstraDB.DataApi/ --configuration Release --no-build --output nupkgs -p:Version=${{ env.PACKAGE_VERSION }}
30+
env:
31+
PACKAGE_VERSION: ${{ replace(github.ref_name, 'v', '') }}
32+
33+
# - name: Push to NuGet
34+
# run: dotnet nuget push nupkgs/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
35+
# env:
36+
# NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
37+
38+
- name: Dry-run NuGet push
39+
run: |
40+
echo "Would run: dotnet nuget push nupkgs/*.nupkg --api-key [REDACTED] --source https://api.nuget.org/v3/index.json"
41+
42+
- name: Upload NuGet package as artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: nuget-package
46+
path: nupkgs/*.nupkg
47+
retention-days: 1

0 commit comments

Comments
 (0)