diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 8fe371a..3b80711 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -6,21 +6,24 @@ jobs: runs-on: windows-latest steps: - name: Download source - uses: actions/checkout@v2 + 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: C:\Users\runneradmin\scoop\shims\scoop.cmd bucket add crystal-preview https://github.com/neatorobito/scoop-crystal + run: scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal - name: Install crystal 2 - run: C:\Users\runneradmin\scoop\shims\scoop.cmd install vs_2022_cpp_build_tools + run: scoop install vs_2022_cpp_build_tools - name: Install crystal 3 - run: C:\Users\runneradmin\scoop\shims\scoop.cmd install crystal + run: scoop install crystal - name: shards install - run: C:\Users\runneradmin\scoop\shims\shards install + run: shards install - name: Setup VS Dev Environment uses: seanmiddleditch/gha-setup-vsdevenv@v4 - name: raylib-cr post-install @@ -28,10 +31,6 @@ jobs: - name: set env run: | echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV - echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs;C:\Users\runneradmin\scoop\shims") >> $env:GITHUB_ENV - - name: check env - run: | - echo $env:LIB - echo $env:PATH + echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV - name: Build examples - run: C:\Users\runneradmin\scoop\shims\crystal run rsrc/build-examples/build.cr \ No newline at end of file + run: crystal run rsrc/build-examples/build.cr \ No newline at end of file diff --git a/github-workflows/ubuntu-prerelease.yml b/github-workflows/ubuntu-prerelease.yml index 369ab72..f4d9f93 100644 --- a/github-workflows/ubuntu-prerelease.yml +++ b/github-workflows/ubuntu-prerelease.yml @@ -30,7 +30,7 @@ jobs: - name: Cleanup rsrc run: rm -rf bin/rsrc/_dev - name: Zip files - run: zip -r prerelease.zip bin/** + run: zip -r ubuntu-prerelease.zip bin/** - uses: "marvinpinto/action-automatic-releases@latest" with: diff --git a/github-workflows/ubuntu-release.yml b/github-workflows/ubuntu-release.yml index 1b9a67f..3b2f244 100644 --- a/github-workflows/ubuntu-release.yml +++ b/github-workflows/ubuntu-release.yml @@ -30,7 +30,7 @@ jobs: - name: Cleanup rsrc run: rm -rf bin/rsrc/_dev - name: Zip files - run: zip -r release.zip bin/** + run: zip -r ubuntu-release.zip bin/** - uses: "marvinpinto/action-automatic-releases@latest" with: diff --git a/github-workflows/windows-build.yml b/github-workflows/windows-build.yml index 903175f..ba2864a 100644 --- a/github-workflows/windows-build.yml +++ b/github-workflows/windows-build.yml @@ -13,14 +13,17 @@ jobs: 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: C:\Users\runneradmin\scoop\shims\scoop.cmd bucket add crystal-preview https://github.com/neatorobito/scoop-crystal + run: scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal - name: Install crystal 2 - run: C:\Users\runneradmin\scoop\shims\scoop.cmd install vs_2022_cpp_build_tools + run: scoop install vs_2022_cpp_build_tools - name: Install crystal 3 - run: C:\Users\runneradmin\scoop\shims\scoop.cmd install crystal + run: scoop install crystal - name: shards install - run: C:\Users\runneradmin\scoop\shims\shards install + run: shards install - name: Setup VS Dev Environment uses: seanmiddleditch/gha-setup-vsdevenv@v4 - name: raylib-cr post-install @@ -35,4 +38,4 @@ jobs: echo $env:PATH - name: shards build run: | - C:\Users\runneradmin\scoop\shims\shards build \ No newline at end of file + shards build \ No newline at end of file diff --git a/github-workflows/windows-docs.yml b/github-workflows/windows-docs.yml new file mode 100644 index 0000000..e707038 --- /dev/null +++ b/github-workflows/windows-docs.yml @@ -0,0 +1,48 @@ +name: Windows - Deploy Docs +on: [push, pull_request] +jobs: + build: + name: Windows - Deploy Docs + 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 lib/raylib-cr/rsrc/install-lib.ps1 + - name: set env + run: | + echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV + echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV + - name: check env + run: | + echo $env:LIB + echo $env:PATH + - name: make site + run: | + crystal docs + - name: Deploy docs + uses: crazy-max/ghaction-github-pages@v1.2.5 + with: + target_branch: gh-pages + build_dir: docs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/github-workflows/windows-prerelease.yml b/github-workflows/windows-prerelease.yml new file mode 100644 index 0000000..f53ab19 --- /dev/null +++ b/github-workflows/windows-prerelease.yml @@ -0,0 +1,61 @@ +name: Windows - Pre Release +on: [push, pull_request] +jobs: + build: + name: Windows - Pre Release + 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 lib/raylib-cr/rsrc/install-lib.ps1 + - name: set env + run: | + echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV + echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV + - name: check env + run: | + echo $env:LIB + echo $env:PATH + - name: shards build + run: | + shards build --release + - name: git lfs fetch + run: git lfs fetch + - name: git lfs checkout + run: git lfs checkout + - name: Copy rsrc + run: | + $ErrorActionPreference= 'silentlycontinue' + mkdir bin/rsrc + copy rsrc/* bin/rsrc + del bin/rsrc/_dev + - name: Zip + run: Compress-Archive -Path "bin/*" -DestinationPath windows-prerelease.zip + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Nightly" + files: | + windows-prerelease.zip \ No newline at end of file diff --git a/github-workflows/windows-release.yml b/github-workflows/windows-release.yml new file mode 100644 index 0000000..62e8055 --- /dev/null +++ b/github-workflows/windows-release.yml @@ -0,0 +1,63 @@ +name: Windows - Release +on: + push: + tags: + - "v*" +jobs: + build: + name: Windows - Release + 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: scoop 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 + - name: set env + run: | + echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV + echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV + - name: check env + run: | + echo $env:LIB + echo $env:PATH + - name: shards build + run: | + shards build --release + - name: git lfs fetch + run: git lfs fetch + - name: git lfs checkout + run: git lfs checkout + - name: Copy rsrc + run: | + $ErrorActionPreference= 'silentlycontinue' + mkdir bin/rsrc + copy rsrc/* bin/rsrc + del bin/rsrc/_dev + - name: Zip + run: Compress-Archive -Path "bin/*" -DestinationPath windows-prerelease.zip + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: | + windows-release.zip \ No newline at end of file