-
Notifications
You must be signed in to change notification settings - Fork 0
155 lines (133 loc) · 6.95 KB
/
Copy pathconsolebuild.yml
File metadata and controls
155 lines (133 loc) · 6.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: ShipItSharp Console Build
on: [push]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.0
- name: Setup .NET Core
uses: actions/setup-dotnet@v5.4.0
with:
dotnet-version: 10.0.x
- name: build
run: dotnet build -c Release src/ShipItSharp.sln
- name: test
run: dotnet test -c Release --no-build src/ShipItSharp.sln
- name: publish-portable
run: dotnet publish -c Release src/ShipItSharp.Console/ShipItSharp.Console.csproj -o /home/runner/work/shipitsharp-release/portable /p:CopyOutputSymbolsToPublishDirectory=false
- name: publish-win-x64
run: dotnet publish -c Release src/ShipItSharp.Console/ShipItSharp.Console.csproj -o /home/runner/work/shipitsharp-release/win-x64 -r win-x64 /p:PublishSingleFile=true --self-contained true /p:PublishTrimmed=true /p:CopyOutputSymbolsToPublishDirectory=false
- name: publish-win-x32
run: dotnet publish -c Release src/ShipItSharp.Console/ShipItSharp.Console.csproj -o /home/runner/work/shipitsharp-release/win-x86 -r win-x86 /p:PublishSingleFile=true --self-contained true /p:PublishTrimmed=true /p:CopyOutputSymbolsToPublishDirectory=false
- name: publish-linux-x64
run: dotnet publish -c Release src/ShipItSharp.Console/ShipItSharp.Console.csproj -o /home/runner/work/shipitsharp-release/linux-x64 -r linux-x64 /p:PublishSingleFile=true --self-contained true /p:PublishTrimmed=true /p:CopyOutputSymbolsToPublishDirectory=false
- name: publish-linux-arm
run: dotnet publish -c Release src/ShipItSharp.Console/ShipItSharp.Console.csproj -o /home/runner/work/shipitsharp-release/linux-arm -r linux-arm /p:PublishSingleFile=true --self-contained true /p:PublishTrimmed=true /p:CopyOutputSymbolsToPublishDirectory=false
- name: publish-mac-x64
run: dotnet publish -c Release src/ShipItSharp.Console/ShipItSharp.Console.csproj -o /home/runner/work/shipitsharp-release/osx-x64 -r osx-x64 /p:PublishSingleFile=true --self-contained true /p:PublishTrimmed=true /p:CopyOutputSymbolsToPublishDirectory=false
- name: publish-debug-symbols
run: dotnet publish -c Release src/ShipItSharp.Console/ShipItSharp.Console.csproj -o /home/runner/work/shipitsharp-release/debug-symbols-tmp -r win-x64 /p:PublishSingleFile=true --self-contained true /p:PublishTrimmed=true
- name: cp-debug-symbols-to-output
run: mkdir /home/runner/work/shipitsharp-release/debug-symbols && cp /home/runner/work/shipitsharp-release/debug-symbols-tmp/*.pdb /home/runner/work/shipitsharp-release/debug-symbols
- name: install-zip
run: sudo apt update && sudo apt install zip unzip
- name: make-zip-dir
run: mkdir /home/runner/work/shipitsharp-release/zips
- name: compress-portable
run: pushd /home/runner/work/shipitsharp-release/portable && zip -r /home/runner/work/shipitsharp-release/zips/shipitsharp-portable.zip * && popd
- name: compress-win-x64
run: pushd /home/runner/work/shipitsharp-release/win-x64 && zip -r /home/runner/work/shipitsharp-release/zips/shipitsharp-win-x64.zip * && popd
- name: compress-win-x86
run: pushd /home/runner/work/shipitsharp-release/win-x86 && zip -r /home/runner/work/shipitsharp-release/zips/shipitsharp-win-x86.zip * && popd
- name: compress-linux-x64
run: pushd /home/runner/work/shipitsharp-release/linux-x64 && zip -r /home/runner/work/shipitsharp-release/zips/shipitsharp-linux-x64.zip * && popd
- name: compress-linux-arm
run: pushd /home/runner/work/shipitsharp-release/linux-arm && zip -r /home/runner/work/shipitsharp-release/zips/shipitsharp-linux-arm.zip * && popd
- name: compress-mac-x64
run: pushd /home/runner/work/shipitsharp-release/osx-x64 && zip -r /home/runner/work/shipitsharp-release/zips/shipitsharp-osx-x64.zip * && popd
- name: compress-debug-symbols
run: pushd /home/runner/work/shipitsharp-release/debug-symbols && zip -r /home/runner/work/shipitsharp-release/zips/debug-symbols.zip * && popd
- uses: actions/upload-artifact@v7.0.1
with:
name: shipitsharp-portable
path: /home/runner/work/shipitsharp-release/portable/
if-no-files-found: error
- uses: actions/upload-artifact@v7.0.1
with:
name: shipitsharp-win-x64
path: /home/runner/work/shipitsharp-release/win-x64/
if-no-files-found: error
- uses: actions/upload-artifact@v7.0.1
with:
name: shipitsharp-win-x86
path: /home/runner/work/shipitsharp-release/win-x86/
if-no-files-found: error
- uses: actions/upload-artifact@v7.0.1
with:
name: shipitsharp-linux-x64
path: /home/runner/work/shipitsharp-release/linux-x64/
if-no-files-found: error
- uses: actions/upload-artifact@v7.0.1
with:
name: shipitsharp-linux-arm
path: /home/runner/work/shipitsharp-release/linux-arm/
if-no-files-found: error
- uses: actions/upload-artifact@v7.0.1
with:
name: shipitsharp-osx-x64
path: /home/runner/work/shipitsharp-release/osx-x64/
if-no-files-found: error
- uses: actions/upload-artifact@v7.0.1
with:
name: shipitsharp-debug-symbol
path: /home/runner/work/shipitsharp-release/debug-symbols/
if-no-files-found: error
- uses: actions/upload-artifact@v7.0.1
with:
name: shipitsharp-all
path: /home/runner/work/shipitsharp-release/zips/
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v3.0.1
if: startsWith(github.ref, 'refs/tags/')
with:
files: /home/runner/work/shipitsharp-release/zips/*
name: ${{ github.ref_name }}
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, '-') }}
draft: true
architecture-site:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v7.0.0
- name: Setup Node
uses: actions/setup-node@v6.4.0
with:
node-version: 24
- name: Configure GitHub Pages
uses: actions/configure-pages@v6.0.0
- name: Build GitHub Pages site
run: |
mkdir -p pages-site
cp -R docs/assets pages-site/assets
cp docs/styles.css docs/index.html docs/command-help.html docs/CNAME pages-site/
npx -y likec4@1.58.0 validate --json --no-layout docs/architecture
npx -y likec4@1.58.0 build docs/architecture -o pages-site/architecture --base /architecture/ --title "ShipItSharp Architecture" --use-hash-history
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v5.0.0
with:
path: pages-site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5.0.0