From 19557183576e804e6aaf2de033eacb37a85f9e67 Mon Sep 17 00:00:00 2001
From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com>
Date: Mon, 23 Nov 2020 09:19:44 +0900
Subject: [PATCH] chore: change master to main (#310)
---
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/label-commenter.yml | 2 +-
.github/workflows/test.yml | 2 +-
README.md | 6 +++---
release.sh | 14 +++++++-------
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 18b583ac..348f3296 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -3,7 +3,7 @@ name: "Code Scanning"
on:
push:
branches:
- - master
+ - main
pull_request:
jobs:
diff --git a/.github/workflows/label-commenter.yml b/.github/workflows/label-commenter.yml
index 0202a33e..01ef5de7 100644
--- a/.github/workflows/label-commenter.yml
+++ b/.github/workflows/label-commenter.yml
@@ -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
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index fb5e1f40..e5dd462e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -3,7 +3,7 @@ name: Test
on:
push:
branches:
- - master
+ - main
paths-ignore:
- '**.md'
pull_request:
diff --git a/README.md b/README.md
index f79f1551..e4cb13b0 100644
--- a/README.md
+++ b/README.md
@@ -3,10 +3,10 @@ Label Commenter Action
-
+
-[![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)
@@ -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)
diff --git a/release.sh b/release.sh
index 05e2b3d1..b122d8c2 100755
--- a/release.sh
+++ b/release.sh
@@ -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"
@@ -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"
@@ -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
@@ -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)"