mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2025-05-04 14:25:30 +08:00
chore: change default branch from master to main (#386)
This commit is contained in:
parent
71f80aff9f
commit
da2d5466d3
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@ -3,7 +3,7 @@ name: "Code Scanning"
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
2
.github/workflows/dev-image.yml
vendored
2
.github/workflows/dev-image.yml
vendored
@ -3,7 +3,7 @@ name: 'Dev Image CI'
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/dev-image.yml'
|
- '.github/workflows/dev-image.yml'
|
||||||
- '.dockerignore'
|
- '.dockerignore'
|
||||||
|
2
.github/workflows/label-commenter.yml
vendored
2
.github/workflows/label-commenter.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: master
|
ref: main
|
||||||
|
|
||||||
- name: Label Commenter
|
- name: Label Commenter
|
||||||
uses: peaceiris/actions-label-commenter@v1.3.7
|
uses: peaceiris/actions-label-commenter@v1.3.7
|
||||||
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -3,7 +3,7 @@ name: 'Test'
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
14
README.md
14
README.md
@ -1,11 +1,11 @@
|
|||||||
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
[](https://github.com/peaceiris/actions-hugo/blob/main/LICENSE)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases)
|
[](https://github.com/peaceiris/actions-hugo/releases)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases.atom)
|
[](https://github.com/peaceiris/actions-hugo/releases.atom)
|
||||||

|

|
||||||
|
|
||||||
[](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
|
[](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
|
||||||
[](https://codecov.io/gh/peaceiris/actions-hugo)
|
[](https://codecov.io/gh/peaceiris/actions-hugo)
|
||||||
[](https://codeclimate.com/github/peaceiris/actions-hugo/maintainability)
|
[](https://codeclimate.com/github/peaceiris/actions-hugo/maintainability)
|
||||||
|
|
||||||
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
|
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
|
||||||
@ -75,7 +75,7 @@ name: github pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@ -210,7 +210,7 @@ name: github pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@ -259,7 +259,7 @@ name: github pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@ -310,7 +310,7 @@ jobs:
|
|||||||
|
|
||||||
- [MIT License - peaceiris/actions-hugo]
|
- [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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10
release.sh
10
release.sh
@ -3,8 +3,10 @@
|
|||||||
# fail on unset variables and command errors
|
# fail on unset variables and command errors
|
||||||
set -eu -o pipefail # -x: is for debugging
|
set -eu -o pipefail # -x: is for debugging
|
||||||
|
|
||||||
if [ "$(git branch --show-current)" != "master" ]; then
|
DEFAULT_BRANCH="main"
|
||||||
echo "$0: Current branch is not master" 1>&2
|
|
||||||
|
if [ "$(git branch --show-current)" != "${DEFAULT_BRANCH}" ]; then
|
||||||
|
echo "$0: Current branch is not ${DEFAULT_BRANCH}" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -26,7 +28,7 @@ if [ "${res}" = "n" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git pull origin master
|
git pull origin "${DEFAULT_BRANCH}"
|
||||||
git tag -d v2 || true
|
git tag -d v2 || true
|
||||||
git pull origin --tags
|
git pull origin --tags
|
||||||
|
|
||||||
@ -44,5 +46,5 @@ rm -rf ./lib
|
|||||||
git commit -m "chore(release): Remove build assets [skip ci]"
|
git commit -m "chore(release): Remove build assets [skip ci]"
|
||||||
|
|
||||||
TAG_NAME="v$(jq -r '.version' ./package.json)"
|
TAG_NAME="v$(jq -r '.version' ./package.json)"
|
||||||
git push origin master
|
git push origin "${DEFAULT_BRANCH}"
|
||||||
git push origin "${TAG_NAME}"
|
git push origin "${TAG_NAME}"
|
||||||
|
Loading…
Reference in New Issue
Block a user