-
Notifications
You must be signed in to change notification settings - Fork 10
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
releaseをworkflow_dispatch経由で実行できるようにする #425
Conversation
✔️ Deploy Preview for ingred-ui ready! 🔨 Explore the source changes: 05ab3d9 🔍 Inspect the deploy log: https://app.netlify.com/sites/ingred-ui/deploys/61136e3860f6cc0007a01caa 😎 Browse the preview: https://deploy-preview-425--ingred-ui.netlify.app |
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.ref }} | ||
ref: ${{ github.event.ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workflow_dispatchで指定したブランチを使えるように(ほぼmasterだけど)
- name: create CHANGELOG | ||
run: make -f ci.mk changelog | ||
env: | ||
RELEASE_VERSION: ${{ steps.get_version.outputs.VERSION }} | ||
RELEASE_VERSION: ${{ github.event.inputs.release_version }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inputで指定したバージョンを使う
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/heads\/release\//} | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo ::set-output name=BRANCH::${GITHUB_REF/refs\/heads\//} | ||
id: extract_branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今まではリリースバージョンを release/*.*.*
のブランチ名から取得していたけどいらなくなったので削除
RELEASE_VERSION: ${{ steps.get_version.outputs.VERSION }} | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.FLUCT_MEMBER_GITHUB_TOKEN }} | ||
title: release v${{ env.RELEASE_VERSION }} | ||
body: | | ||
## Check List | ||
- [ ] CHANGELOGの確認 | ||
- [ ] [v${{ env.RELEASE_VERSION }}のdraftリリースノート](https://github.com/voyagegroup/ingred-ui/releases)をpublish | ||
|
||
## releaseを取り消す場合 | ||
1. [v${{ env.RELEASE_VERSION }}のdraftリリース](https://github.com/voyagegroup/ingred-ui/releases)を削除 | ||
2. このPRを閉じる | ||
3. ブランチを削除 | ||
labels: release | ||
base: master | ||
branch: ${{ env.RELEASE_BRANCH }} | ||
commit-message: "[ci skip] release v${{ env.RELEASE_VERSION }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRは作らず直接commit -> pushして npm publishする流れにした
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTMです!
やったこと
こんな感じでリリースできるようにする