Skip to content

Commit

Permalink
chore: change master to main (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Nov 23, 2020
1 parent 2cd09e5 commit 1955718
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Code Scanning"
on:
push:
branches:
- master
- main
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: master
ref: main

- name: Label Commenter
uses: peaceiris/actions-label-commenter@v1.6.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Label Commenter Action
</h2>

<div align="center">
<img src="https://github.com/peaceiris/actions-label-commenter/master/images/ogp.jpg" alt="Label Commenter Action thumbnail" width="500px">
<img src="https://github.com/peaceiris/actions-label-commenter/main/images/ogp.jpg" alt="Label Commenter Action thumbnail" width="500px">
</div>

[![license](https://img.shields.io/github/license/peaceiris/actions-label-commenter.svg)](https://github.com/peaceiris/actions-label-commenter/blob/master/LICENSE)
[![license](https://img.shields.io/github/license/peaceiris/actions-label-commenter.svg)](https://github.com/peaceiris/actions-label-commenter/blob/main/LICENSE)
[![release](https://img.shields.io/github/release/peaceiris/actions-label-commenter.svg)](https://github.com/peaceiris/actions-label-commenter/releases/latest)
[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-label-commenter.svg)](https://github.com/peaceiris/actions-label-commenter/releases)
[![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-label-commenter/releases.atom)
Expand Down Expand Up @@ -198,7 +198,7 @@ Multiple issues will be closed.

## License

- [MIT License - peaceiris/actions-label-commenter](https://github.com/peaceiris/actions-label-commenter/blob/master/LICENSE)
- [MIT License - peaceiris/actions-label-commenter](https://github.com/peaceiris/actions-label-commenter/blob/main/LICENSE)



Expand Down
14 changes: 7 additions & 7 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
set -eu -o pipefail # -x: is for debugging

CURRENT_BRANCH="$(git branch --show-current)"
if [ "${CURRENT_BRANCH}" != "master" ]; then
echo "$0: Current branch ${CURRENT_BRANCH} is not master, continue? (y/n)"
if [ "${CURRENT_BRANCH}" != "main" ]; then
echo "$0: Current branch ${CURRENT_BRANCH} is not main, continue? (y/n)"
read -r res
if [ "${res}" = "n" ]; then
echo "$0: Stop script"
Expand All @@ -14,7 +14,7 @@ if [ "${CURRENT_BRANCH}" != "master" ]; then
fi

PRERELEASE_TYPE_LIST="prerelease prepatch preminor premajor"
if [ "${CURRENT_BRANCH}" != "master" ]; then
if [ "${CURRENT_BRANCH}" != "main" ]; then
RELEASE_TYPE_LIST="${PRERELEASE_TYPE_LIST}"
else
RELEASE_TYPE_LIST="${PRERELEASE_TYPE_LIST} patch minor major"
Expand All @@ -37,10 +37,10 @@ if [ "${res}" = "n" ]; then
fi

git fetch origin
if [ "${CURRENT_BRANCH}" != "master" ]; then
if [ "${CURRENT_BRANCH}" != "main" ]; then
git pull origin "${CURRENT_BRANCH}"
else
git pull origin master
git pull origin main
git tag -d v1 || true
git pull origin --tags
fi
Expand All @@ -58,10 +58,10 @@ git rm ./lib/index.js
rm -rf ./lib
git commit -m "chore(release): Remove build assets [skip ci]"

if [ "${CURRENT_BRANCH}" != "master" ]; then
if [ "${CURRENT_BRANCH}" != "main" ]; then
git push origin "${CURRENT_BRANCH}"
else
git push origin master
git push origin main
fi

TAG_NAME="v$(jq -r '.version' ./package.json)"
Expand Down

0 comments on commit 1955718

Please sign in to comment.