Skip to content

Commit 62f2ae8

Browse files
fixup! CI : Add nightly release
1 parent 5ef0b95 commit 62f2ae8

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ jobs:
109109
steps:
110110

111111
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
112+
with:
113+
ref: ${{ env.GAFFER_NIGHTLY == '1' && 'pendingNightly' || '' }}
112114

113115
- name: Install Windows SDK
114116
run: |

.github/workflows/nightly.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ jobs:
5151
fi
5252
done
5353
54+
# The "pendingNightly" tag specifies the commit used to build the current nightly.
55+
# The "nightly" tag will be updated to match "pendingNightly" once the builds
56+
# have completed.
57+
git config user.name "${GITHUB_ACTOR}"
58+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
59+
git tag -fa pendingNightly -m "pending nightly build"
60+
git push --force origin refs/tags/pendingNightly
61+
5462
echo GAFFER_NIGHTLY=1 >> $GITHUB_OUTPUT
5563
shell: bash
5664
env:
@@ -79,13 +87,14 @@ jobs:
7987
fetch-depth: 0
8088

8189
- name: Update Nightly Tag
82-
# After a successful build, move the "nightly" tag to HEAD so the tag
83-
# represents the commit from which the latest nightly was built. This
84-
# keeps the GitHub release up to date and allows us to avoid building
85-
# a new nightly from the same commit.
90+
# After a successful build, move the "nightly" tag to the commit tagged
91+
# "pendingNightly" so the "nightly" tag represents the commit from which
92+
# the latest nightly was built. This keeps the GitHub release up to date
93+
# and allows us to avoid building a new nightly from the same commit.
8694
run: |
8795
git config user.name "${GITHUB_ACTOR}"
8896
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
89-
git tag -fa nightly -m "nightly build"
90-
git push --force origin nightly
97+
git tag -fa nightly refs/tags/pendingNightly^{} -m "nightly build"
98+
git push --force origin refs/tags/nightly
99+
git push --delete origin refs/tags/pendingNightly
91100
shell: bash

0 commit comments

Comments
 (0)