Skip to content

Commit

Permalink
Merge pull request #37 from Okabe-Junya/junya/fix/releaser
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
Okabe-Junya authored Oct 2, 2023
2 parents d70cc4e + e5589a8 commit 7f0f575
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,8 @@ jobs:
contents: write
pull-requests: write
runs-on: ubuntu-latest
# マージされたPRに "release: major", "release: minor", "release: patch" のいずれかのラベルが付いている場合にリリースドラフトを更新する
steps:
- name: Check label
id: check_label
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labels = await github.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const labelNames = labels.data.map(label => label.name);
const releaseTypes = ["release: major", "release: minor", "release: patch"];
const releaseType = labelNames.find(labelName => releaseTypes.includes(labelName));
return {
releaseType: releaseType
};
- name: release drafter
if: ${{ steps.check_label.outputs.releaseType != null }}
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7f0f575

Please sign in to comment.