Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
- name: Upload ${{ matrix.preset }}.tar.gz
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ matrix.preset }}.tar.gz
path: ${{ matrix.preset }}.tar.gz
archive: false

Expand All @@ -109,3 +110,54 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}

publish:
if: github.event_name == 'schedule' || (github.event.inputs.ref == 'master' && github.event.inputs.repo == 'ethereum/consensus-specs')
needs: [package]
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
concurrency:
group: nightly-release-publish
cancel-in-progress: false
permissions:
contents: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}

- name: Download packaged artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
pattern: "*.tar.gz"
merge-multiple: true

- name: Generate metadata
id: meta
run: |
run_date=$(gh api "/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--jq '.run_started_at | split("T")[0]')
echo "date=nightly-${run_date}" >> "$GITHUB_OUTPUT"
sha256sum general.tar.gz minimal.tar.gz mainnet.tar.gz > checksums.txt
echo "nightly-${run_date}" > version.txt
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish nightly release
run: |
git tag -f nightly
git push origin nightly --force
if ! gh release view nightly >/dev/null 2>&1; then
gh release create nightly --target ${{ github.sha }} --prerelease --title "Nightly" --notes ""
fi
gh release upload nightly --clobber \
general.tar.gz minimal.tar.gz mainnet.tar.gz checksums.txt version.txt
gh release edit nightly \
--prerelease \
--title "Nightly (${{ steps.meta.outputs.date }})" \
--notes "Reference test vectors from \`$(git rev-parse --short HEAD)\` on \`master\`."
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}