Skip to content

Commit af86b92

Browse files
Create publish.yml
1 parent 5504519 commit af86b92

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish Bicep.Docs packages
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*'
8+
9+
defaults:
10+
run:
11+
working-directory: ./Bicep.Docs
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v2
22+
with:
23+
dotnet-version: 8.0.x
24+
- name: Restore dependencies
25+
run: dotnet restore
26+
- name: Build
27+
run: dotnet build --no-restore --configuration=Release
28+
- name: Publish Windows
29+
run: dotnet publish -p:PublishProfile=win-x64
30+
- name: Publish Linux
31+
run: dotnet publish -p:PublishProfile=linux-x64
32+
- name: Publish macOS
33+
run: dotnet publish -p:PublishProfile=osx-x64
34+
- name: Upload Windows artifact
35+
uses: actions/upload-artifact@v3.1.0
36+
with:
37+
name: win-x64
38+
path: ${{ github.workspace }}/Bicep.Docs/bin/Release/net8.0/publish/win-x64
39+
- name: Upload Linux artifact
40+
uses: actions/upload-artifact@v3.1.0
41+
with:
42+
name: linux-x64
43+
path: ${{ github.workspace }}/Bicep.Docs/bin/Release/net8.0/publish/linux-x64
44+
- name: Upload MacOS artifact
45+
uses: actions/upload-artifact@v3.1.0
46+
with:
47+
name: osx-x64
48+
path: ${{ github.workspace }}/Bicep.Docs/bin/Release/net8.0/publish/osx-x64

0 commit comments

Comments
 (0)