Description
Create GitHub workflow called submit-advent-of-code.yml
Trigger on
Push to main with file changes to puzzles/year_*/day_*/answer_part*.txt
workflow_dispatch
Set env vars
AOC_SESSION: secrets.AOC_SESSION
GH_TOKEN: secrets.USER_TOKEN
Set up
Check out repo - uses: actions/checkout@v4
Setup uv - uses astral-sh/setup-uv@v4 and uv sync
Set concurrency to only run one at a time in this repo and don't cancel in progress runs
Add permissions needed: content, issues
Submit solution using uv run advent_of_code.py submit {year} {day} {part}
Mark this step as successful even if the exit code was 1
Update results section in README.md by running uv run advent_of_code.py update-results {year}
If it was part 1 and the submission was correct:
download part two with uv run advent_of_code.py download {year} {day} and output the part which is printed by the command
Commit and push puzzles in puzzles with user GitHub Actions
Trigger create-puzzle-issue.yml using the year, day and part 2 as strings if part two was downloaded
uses: sourcery-ai/autonomous-advent-of-code/.github/workflows/create-puzzle-issue.yml@main
Reactions are currently unavailable
You can’t perform that action at this time.
submit-advent-of-code.ymlmainwith file changes topuzzles/year_*/day_*/answer_part*.txtworkflow_dispatchAOC_SESSION:secrets.AOC_SESSIONGH_TOKEN:secrets.USER_TOKENuses: actions/checkout@v4uses astral-sh/setup-uv@v4anduv syncuv run advent_of_code.py submit {year} {day} {part}uv run advent_of_code.py update-results {year}uv run advent_of_code.py download {year} {day}and output thepartwhich is printed by the commandpuzzleswith user GitHub Actionscreate-puzzle-issue.ymlusing the year, day and part 2 as strings if part two was downloadeduses: sourcery-ai/autonomous-advent-of-code/.github/workflows/create-puzzle-issue.yml@main