Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
✌️
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina authored Jan 16, 2024
1 parent fde61b7 commit f4e5080
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
const year = now.toLocaleDateString('en-US', { year: 'numeric', timeZone: 'Asia/Tokyo' });
const month = now.toLocaleDateString('en-US', { month: 'numeric', timeZone: 'Asia/Tokyo' });
const [major, minor, patch] = process.env.CURRENT_VERSION.split('.');
console.log(year, month, process.env.CURRENT_VERSION, major, minor, patch);
if (year !== major || month !== minor) {
return `${year}.${month}.0`;
} else {
Expand All @@ -75,3 +74,20 @@ jobs:
echo "${{ env.CHANGES_TEMPLATE }}\n"
sed -i 's/## 202x.x.x (Unreleased)/## ${{ steps.increment_version.outputs.result }}/' CHANGELOG.md
sed "1i ${{ env.CHANGES_TEMPLATE }}\n" CHANGELOG.md > CHANGELOG.md.tmp && mv CHANGELOG.md.tmp CHANGELOG.md
# バージョンをコミット
- name: Commit version
run: |
git config --local user.email "[email protected]"
git config --local user.name "LuckyBeast"
git commit -am "Bump version to ${{ steps.increment_version.outputs.result }}-beta.0"
# バージョンをタグ付け
- name: Tag version
run: |
git tag -a v${{ steps.increment_version.outputs.result }}-beta.0 -m "Bump version to ${{ steps.increment_version.outputs.result }}-beta.0"
# バージョンをpush
- name: Push version
run: "git push origin HEAD:release/${{ steps.increment_version.outputs.result }}-beta.0 --tags"
# リリースを作成
- name: Create release
run: |
gh release create ${{ steps.increment_version.outputs.result }}-beta.0 --prerelease --title "${{ steps.increment_version.outputs.result }}-beta.0" --notes "${{ steps.changelog.outputs.stdout }}"

0 comments on commit f4e5080

Please sign in to comment.