-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4411 from cwisniew/nightly-builds
add nightly github action
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Nightly Release | ||
|
||
on: | ||
schedule: | ||
- cron: '13 2 * * *' # Odd time so that it doesn't run afoul of busy periods everyone picks | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set Vars | ||
id: set-vars | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NIGHTLY_BUILD_GH_TOKEN }} | ||
run: | | ||
echo "LATEST_STABLE_TAG=$(gh release list -R ${{ github.repository}} | grep -v nightly | awk '{ print $1}' | head -1)" >> $GITHUB_ENV | ||
echo "Latest Stable Tag: $LATEST_STABLE_TAG" | ||
echo "NIGHTLY_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV | ||
echo "Creating for Nightly: $NIGHTLY_DATE" | ||
- name: Create Release | ||
id: create-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NIGHTLY_BUILD_GH_TOKEN }} | ||
run: | | ||
gh release create nightly-${NIGHTLY_DATE} -R ${{github.repository}} --title "MapTool Nightly ${NIGHTLY_DATE}" --notes "MapTool Nightly Build for ${NIGHTLY_DATE}" --generate-notes -p --target develop |