Skip to content

Commit

Permalink
Update build_shared.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ricboer0 authored Nov 15, 2024
1 parent 9246163 commit 5fb47b0
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/build_shared.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build and Deploy Shared Libraries

on:
release:
types: [created]
push:
branches:
- main

jobs:
update-version-for-r:
Expand Down Expand Up @@ -73,10 +74,11 @@ jobs:
cp sharedlib/libprismaid_linux_amd64.so r-package/inst/libs/linux/libprismaid_linux_amd64.so
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git checkout ${GITHUB_REF#refs/heads/}
git pull --no-rebase origin ${GITHUB_REF#refs/heads/}
git fetch origin main
git checkout main
git pull origin main
git add r-package/inst/libs/linux/libprismaid_linux_amd64.so
git diff --staged --quiet || (git commit -m "Update linux lib." && git push)
git diff --staged --quiet || (git commit -m "Update linux lib." && git push origin main)
build-windows-amd64:
name: Build Windows Shared Library
Expand Down Expand Up @@ -110,10 +112,11 @@ jobs:
cp sharedlib/libprismaid_windows_amd64.dll r-package/inst/libs/windows/libprismaid_windows_amd64.dll
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git checkout ${GITHUB_REF#refs/heads/}
git pull --no-rebase origin ${GITHUB_REF#refs/heads/}
git fetch origin main
git checkout main
git pull origin main
git add r-package/inst/libs/windows/libprismaid_windows_amd64.dll
git diff --staged --quiet || (git commit -m "Update Windows lib." && git push)
git diff --staged --quiet || (git commit -m "Update Windows lib." && git push origin main)
build-macos-arm64:
name: Build macOS Arm64 Shared Library
Expand Down Expand Up @@ -146,11 +149,12 @@ jobs:
cp sharedlib/libprismaid_darwin_arm64.dylib r-package/inst/libs/macos/libprismaid_darwin_arm64.dylib
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git checkout ${GITHUB_REF#refs/heads/}
git pull --no-rebase origin ${GITHUB_REF#refs/heads/}
git fetch origin main
git checkout main
git pull origin main
git add r-package/inst/libs/macos/libprismaid_darwin_arm64.dylib
git diff --staged --quiet || (git commit -m "Update MacOS lib." && git push)
git diff --staged --quiet || (git commit -m "Update macOS lib." && git push origin main)
package-python:
name: Package Python Project with All Shared Libraries
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5fb47b0

Please sign in to comment.