Skip to content

Commit

Permalink
use artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerKSI committed Oct 27, 2023
1 parent f5d9bf9 commit 37d5c9c
Showing 1 changed file with 34 additions and 15 deletions.
49 changes: 34 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,12 @@ jobs:
run: |
make release-linux
- name: Check if there is any change
id: check-diff
run: |
git add -A
git diff HEAD --quiet || echo "diff=true" >> $GITHUB_OUTPUT
- name: Commit and Push libs
if: steps.check-diff.outputs.diff == 'true'
run: |
git pull
git config --global user.name 'Builder'
git config --global user.email 'go-owasm@users.noreply.github.com'
git commit -am "Built shared lib - linux"
git push
- name: Push artifact
uses: actions/upload-artifact@v3
with:
name: libgo_owasm.so
path: api/libgo_owasm.so
retention-days: 1

build_shared_lib_osx:
runs-on: ubuntu-22.04
Expand All @@ -59,6 +51,34 @@ jobs:
run: |
make release-osx
- name: Push artifact
uses: actions/upload-artifact@v3
with:
name: libgo_owasm.dylib
path: api/libgo_owasm.dylib
retention-days: 1

push:
needs:
- build_shared_lib_linux
- build_shared_lib_osx
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Download libgo_owasm.so
uses: actions/download-artifact@v3
with:
name: libgo_owasm.so
path: api

- name: Download libgo_owasm.dylib
uses: actions/download-artifact@v3
with:
name: libgo_owasm.dylib
path: api

- name: Check if there is any change
id: check-diff
run: |
Expand All @@ -68,7 +88,6 @@ jobs:
- name: Commit and Push libs
if: steps.check-diff.outputs.diff == 'true'
run: |
git pull
git config --global user.name 'Builder'
git config --global user.email 'go-owasm@users.noreply.github.com'
git commit -am "Built shared lib - osx"
Expand Down

0 comments on commit 37d5c9c

Please sign in to comment.