mirror of
https://github.com/sbrow/envr.git
synced 2026-06-27 10:38:33 -04:00
ci: Updated release-please.
This commit is contained in:
1
.github/workflows/odin.yml
vendored
1
.github/workflows/odin.yml
vendored
@@ -26,7 +26,6 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
make version.odin
|
||||
odin build . -o:speed -out:envr
|
||||
|
||||
- name: Test
|
||||
|
||||
6
.github/workflows/release-please.yml
vendored
6
.github/workflows/release-please.yml
vendored
@@ -2,6 +2,8 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
- odin
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -14,7 +16,7 @@ jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: googleapis/release-please-action@v4
|
||||
- uses: googleapis/release-please-action@v5
|
||||
with:
|
||||
# this assumes that you have created a personal access token
|
||||
# (PAT) and configured it as a GitHub action secret named
|
||||
@@ -22,4 +24,4 @@ jobs:
|
||||
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
|
||||
# this is a built-in strategy in release-please, see "Action Inputs"
|
||||
# for more options
|
||||
release-type: odin
|
||||
release-type: simple
|
||||
|
||||
11
Makefile
11
Makefile
@@ -19,25 +19,20 @@ all: release clean
|
||||
$(BUILD_DIR):
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
|
||||
# Generate version.odin from flake.nix
|
||||
version.odin:
|
||||
@echo 'Generating version.odin (v$(VERSION))...'
|
||||
@printf 'package main\n\nVERSION :: "$(VERSION)"\n' > version.odin
|
||||
|
||||
# Build Linux AMD64
|
||||
$(LINUX_AMD64_BIN): version.odin $(BUILD_DIR)
|
||||
$(LINUX_AMD64_BIN): $(BUILD_DIR)
|
||||
@echo "Building for Linux AMD64..."
|
||||
odin build . -target:linux_amd64 -o:speed -out:$(LINUX_AMD64_BIN)
|
||||
@echo "Built $(LINUX_AMD64_BIN)"
|
||||
|
||||
# Build Linux ARM64
|
||||
$(LINUX_ARM64_BIN): version.odin $(BUILD_DIR)
|
||||
$(LINUX_ARM64_BIN): $(BUILD_DIR)
|
||||
@echo "Building for Linux ARM64..."
|
||||
odin build . -target:linux_arm64 -o:speed -out:$(LINUX_ARM64_BIN)
|
||||
@echo "Built $(LINUX_ARM64_BIN)"
|
||||
|
||||
# Build Darwin ARM64 (Mac)
|
||||
$(DARWIN_ARM64_BIN): version.odin $(BUILD_DIR)
|
||||
$(DARWIN_ARM64_BIN): $(BUILD_DIR)
|
||||
@echo "Building for Darwin ARM64..."
|
||||
odin build . -target:darwin_arm64 -o:speed -out:$(DARWIN_ARM64_BIN)
|
||||
@echo "Built $(DARWIN_ARM64_BIN)"
|
||||
|
||||
@@ -2,6 +2,8 @@ package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
VERSION :: #load("version.txt", string)
|
||||
|
||||
cmd_version :: proc(cmd: ^Command) {
|
||||
if has_flag(cmd, "long") || has_flag(cmd, "l") {
|
||||
fmt.printf("envr version %s\n", VERSION)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
make version.odin
|
||||
echo '${version}' > version.txt
|
||||
odin build . -o:speed -out:${pname}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
1
version.txt
Normal file
1
version.txt
Normal file
@@ -0,0 +1 @@
|
||||
0.2.0
|
||||
Reference in New Issue
Block a user