summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorRay <[email protected]>2020-08-19 17:37:21 +0200
committerGitHub <[email protected]>2020-08-19 17:37:21 +0200
commit7471eb11a7473a467e2b656a8b9a24a6480e6b0f (patch)
tree401e5ef48546eee73cb4d5e4f3801149c01f5c79 /.github/workflows
parentf52c5cb9b5f7b862edfa82c940d3c0d36e556f25 (diff)
downloadraylib-7471eb11a7473a467e2b656a8b9a24a6480e6b0f.tar.gz
raylib-7471eb11a7473a467e2b656a8b9a24a6480e6b0f.zip
Create webassembly.yml
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/webassembly.yml57
1 files changed, 57 insertions, 0 deletions
diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.yml
new file mode 100644
index 00000000..2f6b5754
--- /dev/null
+++ b/.github/workflows/webassembly.yml
@@ -0,0 +1,57 @@
+name: WebAssembly
+
+on:
+ push:
+ pull_request:
+ release:
+ types: [published]
+
+jobs:
+ build:
+ runs-on: windows-latest
+
+ env:
+ RELEASE_NAME: raylib-3.1_wasm
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@master
+
+ - name: Setup Environment
+ run: |
+ mkdir build
+ cd build
+ mkdir ${{ env.RELEASE_NAME }}
+ cd ${{ env.RELEASE_NAME }}
+ mkdir include
+ mkdir lib
+ cd ../..
+
+ - name: Build Library
+ run: |
+ cd src
+ make PLATFORM=PLATFORM_WEB RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
+ cd ..
+
+ - name: Generate Artifacts
+ run: |
+ cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
+ cd build
+ tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
+
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.RELEASE_NAME }}.tar.gz
+ path: ./build/${{ env.RELEASE_NAME }}.tar.gz
+
+ - name: Upload Artifact to Release
+ uses: actions/[email protected]
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ github.event.release.upload_url }}
+ asset_path: ./build/${{ env.RELEASE_NAME }}.zip
+ asset_name: ${{ env.RELEASE_NAME }}.zip
+ asset_content_type: application/zip
+ if: github.event_name == 'release' && github.event.action == 'published'