-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.75 KB
/
windows-release.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
45
46
47
48
49
50
51
52
name: Windows - Release(v*)
on:
push:
tags:
- "v*"
jobs:
windows-release:
name: Windows - Release(v*)
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 lib/raylib-cr/rsrc/install-lib.ps1
echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
- name: shards build
run: shards build --release
- name: Copy rsrc
run: |
$ErrorActionPreference= 'silentlycontinue'
git lfs fetch
git lfs checkout
Remove-Item "bin\*.pdb" -Recurse -Force
Remove-Item -Path "bin\rsrc" -Recurse -Force
Copy-Item -Path "rsrc" -Destination "bin\rsrc" -Recurse -Force
Remove-Item -Path "bin\rsrc\_dev" -Recurse -Force
- name: Zip
run: Compress-Archive -Path "bin/*" -DestinationPath windows-release.zip
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "windows-release.zip"