Skip to content

Commit

Permalink
feat: add nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
k0d3r1s committed Aug 30, 2024
1 parent 908791f commit a9faff0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build and Upload Release Assets
on:
release:
types: [published]
push:
branches:
- master

jobs:
build:
Expand Down Expand Up @@ -42,8 +45,12 @@ jobs:
- name: Get the version and set file extension
id: get_version
run: |
$VERSION = $(git describe --tags --exact-match 2>$null || git rev-parse HEAD)
echo "VERSION=$VERSION" >> $env:GITHUB_ENV
if [ "${{ github.event_name }}" = "push" ]; then
echo "VERSION=nightly" >> $env:GITHUB_ENV
else
$VERSION = $(git describe --tags --exact-match 2>$null || git rev-parse HEAD)
echo "VERSION=$VERSION" >> $env:GITHUB_ENV
fi
if ("${{ matrix.goos }}" -eq "windows") {
echo "EXT=.exe" >> $env:GITHUB_ENV
} else {
Expand Down Expand Up @@ -96,6 +103,7 @@ jobs:
release:
needs: build
runs-on: ubuntu-24.04
if: github.event_name == 'release' || github.event_name == 'push'
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
Expand All @@ -112,6 +120,17 @@ jobs:
rm -rf ./dist
mv temp dist
- name: Delete previous nightly release (for nightly builds)
if: github.event_name == 'push'
run: |
gh release delete nightly --yes || true
gh tag delete nightly || true
- name: Create new nightly release (for nightly builds)
if: github.event_name == 'push'
run: |
gh release create nightly --notes "Nightly build based on master branch" --title "nightly" --target master --prerelease
- name: Upload binaries and checksums to GitHub Release
uses: softprops/action-gh-release@v1
with:
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@

<h1 align="center">Cache Warmer</h1>

---

[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)

---

0 comments on commit a9faff0

Please sign in to comment.