Skip to content

Commit 2d40897

Browse files
committed
feat: publish prereelase packages to GitHub packages
#9609
1 parent 6476473 commit 2d40897

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,29 @@ jobs:
8282
with:
8383
commit_message: 'test(snapshot): update snapshots ${{ github.sha }} for ${{ matrix.os }}'
8484

85+
publish-github-packages:
86+
if: github.ref == 'refs/heads/main'
87+
needs: [test, snapshot]
88+
runs-on: ubuntu-latest
89+
permissions:
90+
packages: write
91+
steps:
92+
- uses: actions/checkout@v4
93+
with:
94+
depth: 0
95+
96+
- id: version
97+
uses: paulhatch/[email protected]
98+
99+
- uses: ./.github/actions/build
100+
101+
- name: dotnet pack
102+
run: dotnet pack -c Release /p:Version=${{ steps.versioning.outputs.version }} -o drop/nuget
103+
104+
- name: dotnet nuget push
105+
run: |
106+
dotnet nuget push drop/nuget/*.nupkg --api-key "${{ secrets.NUGET_KEY }}" --skip-duplicate --source https://api.nuget.org/v3/index.json
107+
85108
publish-docs:
86109
if: github.ref == 'refs/heads/main'
87110
needs: [test, snapshot]

.github/workflows/release.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: actions/setup-node@v4
12-
with:
13-
node-version: 18
14-
- uses: actions/setup-dotnet@v4
15-
with:
16-
dotnet-version: |
17-
8.x
18-
19-
- run: npm install
20-
working-directory: templates
21-
22-
- run: npm run lint
23-
working-directory: templates
2411

25-
- run: npm run build
26-
working-directory: templates
12+
- uses: ./.github/actions/build
2713

2814
- name: dotnet pack
2915
run: dotnet pack -c Release /p:Version=${GITHUB_REF_NAME#v} -o drop/nuget

0 commit comments

Comments
 (0)