Skip to content

Commit

Permalink
Add examples release
Browse files Browse the repository at this point in the history
  • Loading branch information
sol-vin committed Sep 17, 2023
1 parent b62d834 commit b2c2732
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ubuntu-release-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Ubuntu - Build Examples
on: push
jobs:
build:
name: Ubuntu - Build Examples
runs-on: ubuntu-latest
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
uses: oprypin/install-crystal@v1
- name: Install Crystal libs
run: shards Install
- name: run install script
run: sh ./rsrc/install.sh
- name: build examples
run: crystal run rsrc/build-examples/build.cr
- name: Zip files
run: zip -r ubuntu-examples.zip examples/_build/**
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
prerelease: true
tag: "latest"
artifacts: "ubuntu-examples.zip"
44 changes: 44 additions & 0 deletions .github/workflows/windows-release-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Windows - Release Examples
on: push
jobs:
build:
name: Windows - Release Examples
runs-on: windows-latest
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install scoop 1
run: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- name: Install scoop 2
run: irm get.scoop.sh -outfile 'install.ps1'
- name: Install scoop 3
run: .\install.ps1 -RunAsAdmin
- name: set scoop env
run: |
echo ("PATH=" + $env:PATH + ";" + $home + "\scoop\shims") >> $env:GITHUB_ENV
- name: Install crystal 1
run: scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
- name: Install crystal 2
run: scoop install vs_2022_cpp_build_tools
- name: Install crystal 3
run: scoop install crystal
- name: shards install
run: shards install
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: raylib-cr post-install
run: powershell rsrc/install-ga.ps1
- name: set env
run: |
echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
- name: Build examples
run: crystal run rsrc/build-examples/build.cr
- name: Zip
run: Compress-Archive -Path "examples/_build/*" -DestinationPath windows-examples.zip
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: "latest"
prerelease: true
artifacts: "windows-examples.zip"

0 comments on commit b2c2732

Please sign in to comment.