Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Nightly

on:
push:
branches: [main, master]
Comment on lines +3 to +5
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Trigger nightly workflow on a schedule

The workflow is named and used as a nightly build, but it only runs on push to main/master; if no commits land on a day, no build or release is produced for that night. This causes the nightly artifact stream to go stale precisely in the no-commit periods where a scheduled nightly run is expected, so the trigger should include on.schedule (and optionally keep push as a separate trigger).

Useful? React with 👍 / 👎.

Comment on lines +4 to +5

permissions:
contents: write

jobs:
nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.25"

- run: go vet ./...

- run: go test ./...

- name: Build binaries
run: |
set -e
platforms=(
"linux/amd64"
"linux/arm64"
"darwin/amd64"
"darwin/arm64"
)
mkdir -p dist
for platform in "${platforms[@]}"; do
os="${platform%/*}"
arch="${platform#*/}"
name="vedcode-${os}-${arch}"
echo "Building ${name}..."
GOOS="${os}" GOARCH="${arch}" go build -o "dist/${name}" ./cmd/vedcode/
tar -czf "dist/${name}.tar.gz" -C dist "${name}"
rm "dist/${name}"
done

- name: Delete previous nightly release
env:
GH_TOKEN: ${{ github.token }}
run: gh release delete nightly --yes --cleanup-tag || true

- name: Create nightly release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create nightly dist/*.tar.gz \
--title "Nightly ($(date -u +%Y-%m-%d))" \
--notes "Автоматическая сборка из \`${GITHUB_SHA::7}\` ($(date -u +%Y-%m-%d %H:%M UTC))" \
--prerelease
Comment on lines +44 to +56
Loading