Skip to content

Commit 9d80cb0

Browse files
authored
Readd upload of example artifacts on release (#122)
* Readd upload of example artifacts on release * Adjust remote workflow module updates Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
1 parent 8e5bf39 commit 9d80cb0

2 files changed

Lines changed: 43 additions & 6 deletions

File tree

.github/workflows/build.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,41 @@ jobs:
5757
with:
5858
name: Examples-${{ runner.os }}
5959
path: examples/build/**/*.fmu
60+
61+
update_interface_release:
62+
name: Update OSI release
63+
runs-on: ubuntu-latest
64+
needs: [build-osmp-examples]
65+
if: ${{ github.event.client_payload }}
66+
steps:
67+
- name: Collect previous artifacts
68+
uses: actions/download-artifact@v5
69+
with:
70+
pattern: Examples-*
71+
path: examples
72+
- name: Zip Windows
73+
uses: TheDoctor0/zip-release@0.7.6
74+
with:
75+
filename: Examples-Windows.zip
76+
directory: examples
77+
path: examples-Windows
78+
- name: Zip Linux
79+
uses: TheDoctor0/zip-release@0.7.6
80+
with:
81+
filename: Examples-Linux.zip
82+
directory: examples
83+
path: examples-Linux
84+
- name: Zip macOS
85+
uses: TheDoctor0/zip-release@0.7.6
86+
with:
87+
filename: Examples-macOS.zip
88+
directory: examples
89+
path: examples-macOS
90+
- name: Upload artifacts to release
91+
uses: svenstaro/upload-release-action@v2
92+
with:
93+
repo_token: ${{ secrets.MACHINE_USER_PAT }}
94+
file_glob: true
95+
file: examples/Examples-*.zip
96+
tag: ${{ github.event.client_payload.tag }}
97+
repo_name: ${{ github.event.client_payload.source_repo }}

.github/workflows/remote_release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ jobs:
2222
run: |
2323
git submodule init
2424
git submodule update --recursive --remote
25-
cd examples/open-simulation-interface
25+
cd examples/osi-cpp
2626
git checkout ${{ github.event.client_payload.tag }}
27+
git submodule update
2728
cd ../..
2829
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
2930
git config --local user.name "github-actions[bot]"
30-
git add .
31+
git add examples/osi-cpp
3132
git commit -m "git submodule updated"
3233
continue-on-error: true
3334

@@ -40,15 +41,13 @@ jobs:
4041
git tag ${REPO_TAG}
4142
4243
- name: GitHub Push
43-
uses: CasperWA/push-protected@v2.15.0
44+
uses: ad-m/github-push-action@v0.6.0
4445
with:
4546
# Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}
46-
token: ${{ secrets.MACHINE_USER_PAT }}
47-
branch: master
47+
github_token: ${{ secrets.MACHINE_USER_PAT }}
4848
# Determines if --tags is used
4949
tags: true
5050
force: true
51-
unprotect_reviews: true
5251

5352
- name: Trigger examples creation
5453
uses: peter-evans/repository-dispatch@v2

0 commit comments

Comments
 (0)