ci: should push before release
This commit is contained in:
parent
8ff56dedd7
commit
f5c98c378a
|
|
@ -96,6 +96,10 @@ def main():
|
||||||
print('Updated repository data, skip release since not specified `--release`')
|
print('Updated repository data, skip release since not specified `--release`')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
subprocess.run(
|
||||||
|
['hub', 'commit', '-m', 'Update holiday data [skip ci]'], check=True)
|
||||||
|
subprocess.run(['hub', 'push'], check=True)
|
||||||
|
|
||||||
tag = now.strftime('%Y.%m.%d')
|
tag = now.strftime('%Y.%m.%d')
|
||||||
temp_note_fd, temp_note_name = mkstemp()
|
temp_note_fd, temp_note_name = mkstemp()
|
||||||
with open(temp_note_fd, 'w', encoding='utf-8') as f:
|
with open(temp_note_fd, 'w', encoding='utf-8') as f:
|
||||||
|
|
@ -104,12 +108,9 @@ def main():
|
||||||
zip_path = _file_path('dist', f'holiday-cn-{tag}.zip')
|
zip_path = _file_path('dist', f'holiday-cn-{tag}.zip')
|
||||||
pack_data(zip_path)
|
pack_data(zip_path)
|
||||||
|
|
||||||
subprocess.run(
|
|
||||||
['hub', 'commit', '-m', 'Update holiday data [skip ci]'], check=True)
|
|
||||||
subprocess.run(['hub', 'release', 'create', '-F', temp_note_name,
|
subprocess.run(['hub', 'release', 'create', '-F', temp_note_name,
|
||||||
'-a', f'{zip_path}#JSON数据',
|
'-a', f'{zip_path}#JSON数据',
|
||||||
tag], check=True)
|
tag], check=True)
|
||||||
subprocess.run(['hub', 'push'], check=True)
|
|
||||||
os.unlink(temp_note_name)
|
os.unlink(temp_note_name)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user