Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gh): リリースノート自動更新プログラム #238

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

kakkokari-gtyih
Copy link
Collaborator

@kakkokari-gtyih kakkokari-gtyih commented Sep 19, 2024

misskey-dev/release-manager-actions#9

github actions初心者なので動くか要確認

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreleasedを受け取る可能性がありそう?

repository dispatchも引数を取れるのでリリース日とリリースバージョン名は引数で取ったほうがいいかも

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Githubのchangelogはmasterブランチから取るようになってるので向こうのワークフローがちゃんとしてればunreleasedが来ることはないと思う

引数で取れるようにするのはやりたい

.github/workflows/on-misskey-release.yml Show resolved Hide resolved
if: steps.diff.outcome == 'failure'
run: |
set -x
git checkout -b update-release-notes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ブランチ名二バージョン番号入れたい

.github/workflows/on-misskey-release.yml Outdated Show resolved Hide resolved
.github/workflows/on-misskey-release.yml Show resolved Hide resolved
@kakkokari-gtyih
Copy link
Collaborator Author

だいたい直したかも

Copy link
Member

@anatawa12 anatawa12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

まぁ動きそう(コードを読んだだけ)

Comment on lines +38 to +39
- run: pnpm start ${{ env.VERSION != null && format('-v {0}', env.VERSION) || '' }} ${{ env.RELEASE_DATE != null && format('-d {0}', env.RELEASE_DATE) || '' }}
working-directory: scripts/changelog-auto-updater
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERSIONやRELEASE_DATEに$が含まれない限りこれでも問題ないんだけど、せっかく environment variable を使ってるなら普通に index.ts で process.env.を使っちゃったほうがインジェクションとかもないしシンプルな気もする

pnpm start時に環境変数無いときにエラーでもいい気もしています

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm start時に環境変数無いときにエラーでもいい気もしています

引数でバージョンが指定されたらそれが最新バージョンがどうかのチェックが走るだけになっているのでなくても動くからそこまでしなくてもいいかな…と(最悪手動で回せるようにすることを考えると)

.github/workflows/on-misskey-release.yml Outdated Show resolved Hide resolved
.github/workflows/on-misskey-release.yml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants