Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
feat: rename master branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Jul 26, 2020
1 parent a8b959a commit ea05734
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 125 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To contribute to this repository, feel free to create a new fork of the reposito
submit a pull request. We highly suggest [ESLint](https://eslint.org/) to be installed
in your text editor or IDE of your choice to ensure builds from GitHub Actions do not fail.

1. Fork, clone, and select the **master** branch.
1. Fork, clone, and select the **main** branch.
2. Create a new branch in your fork.
3. Make your changes.
4. Commit your changes, and push them.
Expand Down
4 changes: 2 additions & 2 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
- name: 'Bug: Cannot Reproduce'
description: Issues that report bugs that cannot be reproduced.
color: f9d0c4
- name: 'Bug: Fixed in master'
description: Issues that report bugs from stable, but that are fixed in master.
- name: 'Bug: Fixed in main'
description: Issues that report bugs from stable, but that are fixed in main.
color: B3E88C
- name: 'Bug: Confirmed'
description: Issues that report confirmed bugs.
Expand Down
136 changes: 68 additions & 68 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
name: Continuous Integration

on:
push:
branches:
- master
- v1.x
pull_request:
push:
branches:
- main
- v1.x
pull_request:

jobs:
Linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Install NodeJS v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: Run ESLint
uses: icrawl/action-eslint@v1
Linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Install NodeJS v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: Run ESLint
uses: icrawl/action-eslint@v1

Testing:
name: Testing - Node v${{ matrix.node_version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [12, 14]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }}
- name: Install Dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: Test
run: yarn test
Testing:
name: Testing - Node v${{ matrix.node_version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [12, 14]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }}
- name: Install Dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: Test
run: yarn test

Building:
name: Building
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Install NodeJS v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: Compile TypeScript
uses: icrawl/action-tsc@v1
with:
build: src
Building:
name: Building
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Install NodeJS v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: Compile TypeScript
uses: icrawl/action-tsc@v1
with:
build: src
104 changes: 52 additions & 52 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
name: Docgen

on:
push:
branches:
- master
pull_request:
push:
branches:
- main
pull_request:

jobs:
Docgen:
name: Docgen
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Install NodeJS v14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-14-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn
- name: Build documentation
run: yarn docs
- name: Publish Docs
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
echo -e "\n# Initialise some useful variables"
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
BRANCH_OR_TAG=`awk -F/ '{print $2}' <<< $GITHUB_REF`
CURRENT_BRANCH=`awk -F/ '{print $NF}' <<< $GITHUB_REF`
Docgen:
name: Docgen
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Install NodeJS v14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-14-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn
- name: Build documentation
run: yarn docs
- name: Publish Docs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
echo -e "\n# Initialise some useful variables"
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
BRANCH_OR_TAG=`awk -F/ '{print $2}' <<< $GITHUB_REF`
CURRENT_BRANCH=`awk -F/ '{print $NF}' <<< $GITHUB_REF`
if [ "$BRANCH_OR_TAG" == "heads" ]; then
SOURCE_TYPE="branch"
else
SOURCE_TYPE="tag"
fi
if [ "$BRANCH_OR_TAG" == "heads" ]; then
SOURCE_TYPE="branch"
else
SOURCE_TYPE="tag"
fi
echo -e "\n# Checkout the repo in the target branch"
TARGET_BRANCH="gh-pages"
git clone $REPO out -b $TARGET_BRANCH
echo -e "\n# Checkout the repo in the target branch"
TARGET_BRANCH="gh-pages"
git clone $REPO out -b $TARGET_BRANCH
echo -e "\n# Move the generated docs to the newly-checked-out repo, to be committed and pushed"
rsync -vau docs/ out/
rsync -va README.md out/
echo -e "\n# Move the generated docs to the newly-checked-out repo, to be committed and pushed"
rsync -vau docs/ out/
rsync -va README.md out/
echo -e "\n# Commit and push"
cd out
git add --all .
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_EMAIL}"
git commit -m "docs: api docs build for${GITHUB_SHA}" || true
git push origin $TARGET_BRANCH
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
GITHUB_ACTOR: NM-EEA-Y
GITHUB_EMAIL: [email protected]
echo -e "\n# Commit and push"
cd out
git add --all .
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_EMAIL}"
git commit -m "docs: api docs build for${GITHUB_SHA}" || true
git push origin $TARGET_BRANCH
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
GITHUB_ACTOR: NM-EEA-Y
GITHUB_EMAIL: [email protected]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<div align="center">
<p>
<a href="https://github.com/skyra-project/decorators/blob/master/LICENSE.md">
<a href="https://github.com/skyra-project/decorators/blob/main/LICENSE.md">
<img src="https://img.shields.io/github/license/skyra-project/decorators?logo=github&maxAge=3600" alt="NPM version" />
</a>
</p>
Expand Down Expand Up @@ -42,7 +42,7 @@ To contribute to this repository, feel free to create a new fork of the reposito
submit a pull request. We highly suggest [ESLint](https://eslint.org/) to be installed
in your text editor or IDE of your choice to ensure builds from GitHub Actions do not fail.

1. Fork, clone, and select the **master** branch.
1. Fork, clone, and select the **main** branch.
2. Create a new branch in your fork.
3. Make your changes.
4. Commit your changes, and push them.
Expand All @@ -66,6 +66,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

0 comments on commit ea05734

Please sign in to comment.