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/dev-image.yml b/.github/workflows/dev-image.yml index 2a27412f..99a9cd85 100644 --- a/.github/workflows/dev-image.yml +++ b/.github/workflows/dev-image.yml @@ -3,7 +3,7 @@ name: 'Dev Image CI' on: push: branches: - - master + - main paths: - '.github/workflows/dev-image.yml' - '.dockerignore' diff --git a/.github/workflows/label-commenter.yml b/.github/workflows/label-commenter.yml index 3dfedad8..b1363ec3 100644 --- a/.github/workflows/label-commenter.yml +++ b/.github/workflows/label-commenter.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: master + ref: main - name: Label Commenter uses: peaceiris/actions-label-commenter@v1.3.7 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a038126..37d42d30 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 eb45e65f..4376e024 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -[![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE) +[![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/main/LICENSE) [![release](https://img.shields.io/github/release/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases/latest) [![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases) [![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-hugo/releases.atom) -![Test](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg?branch=master&event=push) +![Test](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg?branch=main&event=push) [![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-hugo/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-hugo) -[![codecov](https://codecov.io/gh/peaceiris/actions-hugo/branch/master/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-hugo) +[![codecov](https://codecov.io/gh/peaceiris/actions-hugo/branch/main/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-hugo) [![Maintainability](https://api.codeclimate.com/v1/badges/ebf2eef3a046b396ba9c/maintainability)](https://codeclimate.com/github/peaceiris/actions-hugo/maintainability) GitHub Actions for Hugo @@ -75,7 +75,7 @@ name: github pages on: push: branches: - - master + - main jobs: deploy: @@ -210,7 +210,7 @@ name: github pages on: push: branches: - - master + - main jobs: deploy: @@ -259,7 +259,7 @@ name: github pages on: push: branches: - - master + - main jobs: deploy: @@ -310,7 +310,7 @@ jobs: - [MIT License - peaceiris/actions-hugo] -[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/master/LICENSE +[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/main/LICENSE diff --git a/release.sh b/release.sh index f63a1473..eb9efe05 100755 --- a/release.sh +++ b/release.sh @@ -3,8 +3,10 @@ # fail on unset variables and command errors set -eu -o pipefail # -x: is for debugging -if [ "$(git branch --show-current)" != "master" ]; then - echo "$0: Current branch is not master" 1>&2 +DEFAULT_BRANCH="main" + +if [ "$(git branch --show-current)" != "${DEFAULT_BRANCH}" ]; then + echo "$0: Current branch is not ${DEFAULT_BRANCH}" 1>&2 exit 1 fi @@ -26,7 +28,7 @@ if [ "${res}" = "n" ]; then fi git fetch origin -git pull origin master +git pull origin "${DEFAULT_BRANCH}" git tag -d v2 || true git pull origin --tags @@ -44,5 +46,5 @@ rm -rf ./lib git commit -m "chore(release): Remove build assets [skip ci]" TAG_NAME="v$(jq -r '.version' ./package.json)" -git push origin master +git push origin "${DEFAULT_BRANCH}" git push origin "${TAG_NAME}"