-
Notifications
You must be signed in to change notification settings - Fork 17
44 lines (44 loc) · 1.58 KB
/
windows-release-examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Windows - Release Examples
on:
push:
branches:
- master
jobs:
windows-prerelease:
name: Windows - Release Examples
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
echo ("PATH=" + $env:PATH + ";" + $home + "\scoop\shims") >> $env:GITHUB_ENV
scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
scoop install vs_2022_cpp_build_tools
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/native/windows/install-ga.ps1
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
Copy-Item -Path "libs\*.dll" -Destination "examples\_build" -Recurse -Force
- 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"