Skip to content

add nightly github action #2

add nightly github action

add nightly github action #2

Workflow file for this run

name: Nightly Release
on:
schedule:
- cron: '*/20 * * * *' # Runs every day at midnight
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.NIGHTLY_BUILD_GH_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: |
LATEST_STABLE_TAG=$(gh release list -R ${{ github.repository}} | grep -v nightly | awk '{ print $1}' | head -1)
echo "Latest Stable Tag: $LATEST_STABLE_TAG"
NIGHTLY_DATE=$(date +%Y%m%d)
echo "Creating for Nightly: $NIGHTLY_DATE"
gh release create nightly-${NIGHTLY-DATE} -R ${{github.repository}} --notes "MapTool Nightly Build for ${{NIGHTLY_DATE}}" --generate-notes -p -target develop