Skip to content

Commit

Permalink
Merge pull request #4411 from cwisniew/nightly-builds
Browse files Browse the repository at this point in the history
add nightly github action
  • Loading branch information
cwisniew authored Nov 22, 2023
2 parents e7159f0 + ebd4318 commit 3ecc1b3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/nightly-publish.yml
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

0 comments on commit 3ecc1b3

Please sign in to comment.