ci: complete switch to atlas

This commit is contained in:
Daylin Morgan 2023-11-10 13:51:30 -06:00
parent 34a2cb9940
commit 5abc698a82
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
5 changed files with 55 additions and 22 deletions

View file

@ -1,9 +1,36 @@
name: ⚙️ Build Binaries
name: 👑 ⚙️ Build Nim Binaries w/ Forge and Atlas
on:
workflow_dispatch:
workflow_call:
jobs:
build-artifact:
uses: daylinmorgan/actions/.github/workflows/build-nim-forge.yml@main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: 2.0.0
- uses: goto-bus-stop/setup-zig@v2
- name: Setup Build Environment
run: |
nimble install -Y 'https://github.com/nim-lang/atlas.git@#f7ade65f' forge
atlas init --deps:.workspace
atlas install
- name: Create artifact bundles
run: nim release && nim bundle
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
dist/*.tar.gz
dist/*.zip

View file

@ -17,7 +17,7 @@ jobs:
build-artifacts:
needs: check-commits
if: ${{ needs.check-commits.outputs.quit != 'true' }}
uses: daylinmorgan/actions/.github/workflows/build-nim-forge.yml@main
uses: ./.github/workflows/build.yml
generate-release:
needs: build-artifacts

View file

@ -10,7 +10,7 @@ permissions:
jobs:
build-artifacts:
uses: daylinmorgan/actions/.github/workflows/build-nim-forge.yml@main
uses: ./.github/workflows/build.yml
create-release:
needs: build-artifacts

View file

@ -1,2 +1,25 @@
import std/[strformat, strutils]
task debugTui, "debug tui":
exec "nim -d:debug c -r src/tui.nim"
task build, "build app":
selfExec "c -o:bin/tsm src/tsm.nim"
task release, "build release assets":
version = (gorgeEx "git describe --tags --always --match 'v*'").output
exec &"forge release -v {version} -V"
task bundle, "package build assets":
withDir "dist":
for dir in listDirs("."):
echo dir
let cmd = if "windows" in dir:
&"7z a {dir}.zip {dir}"
else:
&"tar czf {dir}.tar.gz {dir}"
cpFile("../README.md", &"{dir}/README.md")
exec cmd

View file

@ -15,20 +15,3 @@ requires "nim >= 2.0.0",
"cligen",
"https://github.com/daylinmorgan/bbansi#main"
import strformat
task release, "build release assets":
version = (gorgeEx "git describe --tags --always --match 'v*'").output
exec &"forge release -v {version} -V"
task bundle, "package build assets":
withDir "dist":
for dir in listDirs("."):
let cmd = if "windows" in dir:
&"7z a {dir}.zip {dir}"
else:
&"tar czf {dir}.tar.gz {dir}"
cpFile("../README.md", &"{dir}/README.md")
exec cmd