From 95a82410837c867d678f58c9e50f3e8e9440c79e Mon Sep 17 00:00:00 2001 From: drojf <1249449+drojf@users.noreply.github.com> Date: Thu, 8 Feb 2024 23:16:07 +1100 Subject: [PATCH] Run deploy on all pushes to main with date as tag --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbf9d88..8ad9214 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: Build updates.json file # Run this workflow on every push or pull request on: push: + branches: + - main # Docs on sharing data between jobs (between VMs): https://help.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts#passing-data-between-jobs-in-a-workflow jobs: @@ -19,10 +21,14 @@ jobs: - name: Run Build and Deploy Script run: python build.py + - name: Set current date as env variable + run: echo "NOW=$(date +'%Y-%m-%d_%H-%M-%S')" >> $GITHUB_ENV + - name: Release uses: softprops/action-gh-release@v1 - # if: startsWith(github.ref, 'refs/tags/') # only publish tagged commits + #if: startsWith(github.ref, 'refs/tags/') # only publish tagged commits with: + tag_name: ${{ env.var_name }} files: | *.json # draft: true