Skip to content

Commit b7c09cf

Browse files
committed
ci: 💚 workflow files update
1 parent ba5132f commit b7c09cf

5 files changed

Lines changed: 54 additions & 56 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow will publish a package when a release is created
2+
3+
name: Publish package to NuGet repository
4+
on:
5+
release:
6+
types: [created]
7+
jobs:
8+
publish-nuget:
9+
runs-on: windows-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v1
13+
- name: Setup .NET Core @ Latest
14+
uses: actions/setup-dotnet@v1
15+
with:
16+
dotnet-version: '3.1.x'
17+
env:
18+
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }}
19+
- name: Build solution and generate NuGet package
20+
run: |
21+
cd contentstack-utils-dotnet
22+
dotnet pack -c Release -o out
23+
24+
- name: Push generated package to GitHub registry
25+
run: dotnet nuget push ./contentstack-utils-dotnet/out/*.nupkg --api-key $NUGET_AUTH_TOKEN --skip-duplicate --no-symbols true
26+
27+
publish-git:
28+
runs-on: windows-latest
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v1
32+
- name: Setup .NET Core @ Latest
33+
uses: actions/setup-dotnet@v1
34+
with:
35+
dotnet-version: '3.1.x'
36+
source-url: https://nuget.pkg.github.com/Contentstack/index.json
37+
env:
38+
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
- name: Build solution and generate NuGet package
40+
run: |
41+
cd contentstack-utils-dotnet
42+
dotnet pack -c Release -o out
43+
44+
- name: Push generated package to GitHub registry
45+
run: dotnet nuget push ./contentstack-utils-dotnet/out/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate --no-symbols true

.github/workflows/sast-scan.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/sca-scan.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ jobs:
66
security:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@master
9+
- name: Checkout repository
10+
uses: actions/checkout@master
11+
- name: Setup .NET Core @ Latest
12+
uses: actions/setup-dotnet@v1
13+
with:
14+
dotnet-version: "7.0.x"
15+
- name: Run Dotnet Restore
16+
run: |
17+
dotnet restore
1018
- name: Run Snyk to check for vulnerabilities
1119
uses: snyk/actions/dotnet@master
1220
env:

.github/workflows/secrets-scan.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)