mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-18 22:53:16 +00:00
Update CI and release job
This commit is contained in:
parent
a423d8fefd
commit
edeb80598d
2 changed files with 66 additions and 0 deletions
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
@ -95,13 +95,21 @@ jobs:
|
|||
needs: [build-mod, build-proxy-linux, build-proxy-windows]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true
|
||||
# Not actually necessary to checkout anything, but have a single file just in case.
|
||||
sparse-checkout: README.md
|
||||
- name: Download all workflow run artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
merge-multiple: true
|
||||
- name: List artifacts
|
||||
run: ls -R
|
||||
- name: Get tag message
|
||||
run: git tag -l --format='%(contents)' $(git describe --tags) > release_body.md
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
draft: true
|
||||
artifacts: "*.zip"
|
||||
bodyFile: release_body.md
|
||||
|
|
58
scripts/check_pre_ci.py
Normal file
58
scripts/check_pre_ci.py
Normal file
|
@ -0,0 +1,58 @@
|
|||
from prepare_release import *
|
||||
|
||||
def generate_notes(tag):
|
||||
notes = ReleaseNotes()
|
||||
|
||||
notes.title("Noita Entangled Worlds "+tag)
|
||||
|
||||
notes.p("")
|
||||
|
||||
notes.title("Accepted pull requests")
|
||||
if pull_requests:
|
||||
for request in pull_requests:
|
||||
notes.l(request)
|
||||
else:
|
||||
notes.p("No pull requests have been accepted in this release.")
|
||||
|
||||
notes.title("Installation")
|
||||
notes.p("Download and unpack `noita-proxy-win.zip` or `noita-proxy-linux.zip`, depending on your OS. After that, launch the proxy.")
|
||||
notes.p("Proxy is able to download and install the mod automatically. There is no need to download the mod (`quant.ew.zip`) manually.")
|
||||
notes.p("""You'll be prompted for a path to `noita.exe` when launching the proxy for the first time.
|
||||
It should be detected automatically as long as you use steam version of the game and steam is launched.
|
||||
""")
|
||||
|
||||
notes.title("Updating")
|
||||
notes.p("There is a button in bottom-left corner on noita-proxy's main screen that allows to auto-update to a new version when one is available")
|
||||
|
||||
print()
|
||||
notes_path = "/tmp/rnotes.md"
|
||||
with open(notes_path, "w") as f:
|
||||
print(notes.gen_md(), file=f)
|
||||
|
||||
subprocess.check_call(["nano", notes_path])
|
||||
|
||||
return notes_path
|
||||
|
||||
def main():
|
||||
tag = "v"+version
|
||||
if check_release_exists(tag):
|
||||
print("Release already exists, exiting")
|
||||
exit(1)
|
||||
|
||||
subprocess.check_call(["git", "pull"])
|
||||
subprocess.check_call(["git", "commit", "-am", "Automated commit: "+tag])
|
||||
|
||||
|
||||
last_release = get_last_release()
|
||||
print("Last release is:", last_release["name"])
|
||||
|
||||
pull_requests = get_pull_requests_from(last_release["publishedAt"])
|
||||
|
||||
notes_path = generate_notes(tag)
|
||||
|
||||
subprocess.check_call(["git", "tag", "-a", "-F", notes_path ])
|
||||
subprocess.check_call(["git", "push"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue