Skip to content

Commit

Permalink
chore: Change default branch from master to main (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Jan 16, 2021
1 parent 0ab46a4 commit 335b17e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 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/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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ GitHub Actions for mdBook
</h2>

<div align="center">
<img src="https://raw.githubusercontent.com/peaceiris/actions-mdbook/master/images/ogp.jpg" alt="GitHub Actions for mdBook thumbnail" width="500px">
<img src="https://raw.githubusercontent.com/peaceiris/actions-mdbook/main/images/ogp.jpg" alt="GitHub Actions for mdBook thumbnail" width="500px">
</div>

[![license](https://img.shields.io/github/license/peaceiris/actions-mdbook.svg)](https://github.com/peaceiris/actions-mdbook/blob/master/LICENSE)
[![license](https://img.shields.io/github/license/peaceiris/actions-mdbook.svg)](https://github.com/peaceiris/actions-mdbook/blob/main/LICENSE)
[![release](https://img.shields.io/github/release/peaceiris/actions-mdbook.svg)](https://github.com/peaceiris/actions-mdbook/releases/latest)
[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-mdbook.svg)](https://github.com/peaceiris/actions-mdbook/releases)
![Test](https://github.com/peaceiris/actions-mdbook/workflows/Test/badge.svg?branch=master&event=push)
![Test](https://github.com/peaceiris/actions-mdbook/workflows/Test/badge.svg?branch=main&event=push)
[![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-mdbook/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-mdbook)
[![codecov](https://codecov.io/gh/peaceiris/actions-mdbook/branch/master/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-mdbook)
[![codecov](https://codecov.io/gh/peaceiris/actions-mdbook/branch/main/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-mdbook)
[![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-mdbook/releases.atom)

[rust-lang/mdBook] Setup Action.
Expand Down Expand Up @@ -65,7 +65,7 @@ name: github pages
on:
push:
branches:
- master
- main

jobs:
deploy:
Expand Down Expand Up @@ -185,7 +185,7 @@ The alpine base mdBook Docker image is provided on the following repository.

- [MIT License - peaceiris/actions-mdbook]

[MIT License - peaceiris/actions-mdbook]: https://github.com/peaceiris/actions-mdbook/blob/master/LICENSE
[MIT License - peaceiris/actions-mdbook]: https://github.com/peaceiris/actions-mdbook/blob/main/LICENSE



Expand Down
8 changes: 4 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# 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
if [ "$(git branch --show-current)" != "main" ]; then
echo "$0: Current branch is not main" 1>&2
exit 1
fi

Expand All @@ -26,7 +26,7 @@ if [ "${res}" = "n" ]; then
fi

git fetch origin
git pull origin master
git pull origin main
git tag -d v1 || true
git pull origin --tags

Expand All @@ -44,5 +44,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 main
git push origin "${TAG_NAME}"

0 comments on commit 335b17e

Please sign in to comment.