Skip to content

Commit 399bd71

Browse files
committed
Add deploy stage via GitHub Actions
1 parent 658c22d commit 399bd71

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/checkCI.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ jobs:
103103
else
104104
cmake --build build --target install
105105
fi
106+
- name: Upload artifacts
107+
uses: actions/upload-artifact@v4
108+
with:
109+
name: msl-binaries-${{ matrix.toolchain }}
110+
path: Modelica/Resources/Library/
111+
retention-days: 5
106112

107113
external_c_checks_cmake_cygwin:
108114
name: external_c_checks_cmake_windows-cygwin
@@ -220,3 +226,39 @@ jobs:
220226
echo "::add-matcher::./.github/check_deprecated_line_color.json"
221227
python ./.CI/check_deprecated_line_color.py Complex.mo Modelica ModelicaReference ModelicaServices ModelicaTest ModelicaTestConversion4.mo ModelicaTestOverdetermined.mo
222228
echo "::remove-matcher owner=check_deprecated_line_color::"
229+
230+
deploy:
231+
name: Deploy
232+
runs-on: ubuntu-latest
233+
needs: external_c_checks_cmake
234+
if: github.event_name == 'workflow_dispatch' || contains(github.ref, 'refs/tags/')
235+
steps:
236+
- name: Checkout code
237+
uses: actions/checkout@v6
238+
with:
239+
fetch-depth: 5
240+
- name: Download all artifacts
241+
uses: actions/download-artifact@v4
242+
with:
243+
path: artifacts
244+
- name: List downloaded artifacts
245+
run: find artifacts -type f | head -20
246+
- name: Bundle and prepare binaries
247+
run: |
248+
mkdir -p msl-binaries
249+
cd artifacts
250+
for dir in msl-binaries-*/; do
251+
toolchain=${dir#msl-binaries-}
252+
toolchain=${toolchain%/}
253+
mkdir -p "../msl-binaries/${toolchain}"
254+
cp -r "${dir}"* "../msl-binaries/${toolchain}/" || true
255+
done
256+
cd ..
257+
tar -czf ModelicaStandardLibrary-binaries-${{ github.ref_name }}.tar.gz msl-binaries/
258+
ls -lh ModelicaStandardLibrary-binaries-${{ github.ref_name }}.tar.gz
259+
- name: Upload artifacts
260+
uses: actions/upload-artifact@v4
261+
with:
262+
name: msl-binaries
263+
path: ModelicaStandardLibrary-binaries-${{ github.ref_name }}.tar.gz
264+
retention-days: 30

0 commit comments

Comments
 (0)