Skip to content

Commit

Permalink
Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sol-vin committed Sep 21, 2023
1 parent 76d105c commit 4543562
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ jobs:
- name: Install raylib 2
run: sudo ln -s /usr/lib/libraylib.so.450 /lib/raylib.so
- name: Build project
run: shards build
run: |
shards build map-viewer
shards build wad-viewer
45 changes: 45 additions & 0 deletions .github/workflows/ubuntu-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Ubuntu - Pre Release(latest)

on:
push:
branches:
- "master"

jobs:
ubuntu-pre-release:
name: "Ubuntu - Pre Release(latest)"
runs-on: "ubuntu-latest"
permissions:
contents: write
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
uses: oprypin/install-crystal@v1
- name: Install Crystal libs
run: shards install
- name: raylib-cr post-install
run: sh ./lib/raylib-cr/rsrc/install-lib.sh
- name: Build map-viewer
run: shards build --release map-viewer
- name: Zip files
run: zip -r ubuntu-map-viewer.zip bin/**
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
prerelease: true
tag: "latest"
artifacts: "ubuntu-map-viewer.zip"
- name: Cleanup
run: rm -rf bin
- name: Build wad-viewer
run: shards build --release wad-viewer
- name: Zip files
run: zip -r ubuntu-wad-viewer.zip bin/**
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
prerelease: true
tag: "latest"
artifacts: "ubuntu-wad-viewer.zip"

58 changes: 58 additions & 0 deletions .github/workflows/windows-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Windows - Pre Release(latest)
on:
push:
branches:
- "master"
jobs:
windows-prerelease:
name: Windows - Pre Release(latest)
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: Build map-viewer
run: |
shards build --release map-viewer
Remove-Item "bin\*.pdb" -Recurse -Force
- name: Zip
run: Compress-Archive -Path "bin/*" -DestinationPath windows-map-viewer.zip
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: "latest"
prerelease: true
artifacts: "windows-map-viewer.zip"
- name: Cleanup
run: Remove-Item -Path "bin" -Recurse -Force
- name: Build wad-viewer
run: |
shards build --release wad-viewer
Remove-Item "bin\*.pdb" -Recurse -Force
- name: Zip
run: Compress-Archive -Path "bin/*" -DestinationPath windows-wad-viewer.zip
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: "latest"
prerelease: true
artifacts: "windows-wad-viewer.zip"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ Here is a full list of all modules inside `Apps`:
## Contributors

- [Devin Shwagginz](https://github.com/D-Shwagginz) - creator and maintainer
- [Ian Rash](https://github.com/sol-vin) - co-creator and owner of [raylib-cr](https://github.com/sol-vin/raylib-cr)
- [Ian Rash](https://github.com/sol-vin) - Code Review and DevOPS
12 changes: 7 additions & 5 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ name: wa-cr
version: 1.0.0

authors:
- Ian Rash <ian@sol.vin>
- D. Shwagginz <dshwagbusiness@gmail.com>
- (Creator) D. Shwagginz <dshwagbusiness@gmail.com>
- (Code Review/DevOPS) Ian Rash <ian@sol.vin>

targets:
wa-cr:
main: src/wa-cr.cr
map-viewer:
main: src/apps/map-viewer.cr
wad-viewer:
main: src/apps/wad-viewer.cr

dependencies:
raylib-cr:
github: sol-vin/raylib-cr
debug:
github: Sija/debug.cr


crystal: 1.8.1
crystal: 1.9.2

license: MIT

0 comments on commit 4543562

Please sign in to comment.