mirror of
https://github.com/daylinmorgan/tsm.git
synced 2024-11-16 09:18:32 -06:00
ci: complete switch to atlas
This commit is contained in:
parent
34a2cb9940
commit
5abc698a82
5 changed files with 55 additions and 22 deletions
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
|
@ -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
|
||||
|
||||
|
|
2
.github/workflows/nightly.yml
vendored
2
.github/workflows/nightly.yml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -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
|
||||
|
|
23
config.nims
23
config.nims
|
@ -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
|
||||
|
||||
|
||||
|
|
17
tsm.nimble
17
tsm.nimble
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue