Create webassembly.yml
This commit is contained in:
parent
f52c5cb9b5
commit
7471eb11a7
1 changed files with 57 additions and 0 deletions
57
.github/workflows/webassembly.yml
vendored
Normal file
57
.github/workflows/webassembly.yml
vendored
Normal file
|
@ -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/upload-release-asset@v1.0.1
|
||||||
|
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'
|
Loading…
Add table
Add a link
Reference in a new issue