Skip to content

Commit

Permalink
chore: update branch references
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Nov 28, 2024
1 parent 1a4c2b6 commit abacaa3
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 107 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: test & maybe release
on:
push:
branches:
- master
- main
pull_request:
workflow_dispatch:

Expand Down
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/node_modules
/build
/dist
/.docs
/.coverage
/.vscode
node_modules
build
dist
.docs
.coverage
node_modules
package-lock.json
yarn.lock
.vscode
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# aegir

[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
[![codecov](https://img.shields.io/codecov/c/github/ipfs/aegir.svg?style=flat-square)](https://codecov.io/gh/ipfs/aegir)
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/aegir/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/aegir/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/aegir/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/ipfs/aegir/actions/workflows/js-test-and-release.yml?query=branch%3Amain)

> JavaScript project management
## Install
# Install

```console
$ npm i aegir
```

### Browser `<script>` tag
## Browser `<script>` tag

Loading this module through a script tag will make its exports available as `Aegir` in the global namespace.

Expand Down Expand Up @@ -136,11 +138,11 @@ module.exports = {
}
```
You can find the complete default config [here](https://github.com/ipfs/aegir/blob/master/src/config/user.js#L12) and the types [here](https://github.com/ipfs/aegir/blob/master/src/types.d.ts).
You can find the complete default config [here](https://github.com/ipfs/aegir/blob/main/src/config/user.js#L12) and the types [here](https://github.com/ipfs/aegir/blob/main/src/types.d.ts).
## Continuous Integration
Check this template for Github Actions <https://github.com/ipfs/aegir/blob/master/md/github-actions.md>
Check this template for Github Actions <https://github.com/ipfs/aegir/blob/main/md/github-actions.md>
## Testing helpers
Expand All @@ -163,7 +165,7 @@ Aegir will detect the presence of `tsconfig.json` files and build typescript as
7. Generate a changelog based on the git log
8. Commit the version change & `CHANGELOG.md`
9. Create a git tag
10. Run `git push` to `origin/master`
10. Run `git push` to `origin/main`
11. Publish a release to Github releases
12. Generate documentation and push to Github Pages
13. Publish to npm
Expand All @@ -172,18 +174,18 @@ Aegir will detect the presence of `tsconfig.json` files and build typescript as
aegir release --help
```
## API Docs
# API Docs
- <https://ipfs.github.io/aegir>
## License
# License
Licensed under either of
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/aegir/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](https://github.com/ipfs/aegir/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
## Contribute
# Contribute
Contributions welcome! Please check out [the issues](https://github.com/ipfs/aegir/issues).
Expand Down
96 changes: 23 additions & 73 deletions md/github-actions.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,32 @@
Create a new file called `main.yml` inside `.github/workflows` with the following content:
Create a new file called `js-test-and-release.yml` inside `.github/workflows` with the following content:

```yml
name: ci
name: test & maybe release

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

permissions:
contents: write
id-token: write
packages: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir lint
- run: npx aegir build
- run: npx aegir dep-check
- run: npx aegir doc-check
- uses: ipfs/aegir/actions/bundle-size@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [14, 16]
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npx aegir test -t node --bail --cov
- uses: codecov/codecov-action@v1
test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- run: npm install
- run: npx aegir test -t browser --bail --cov
- run: npx aegir test -t webworker --bail
- uses: codecov/codecov-action@v1
test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- run: npm install
- run: npx aegir test -t browser -t webworker --bail -- --browser firefox
test-webkit:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- run: npm install
- run: npx aegir test -t browser -t webworker --bail -- --browser webkit
test-electron-main:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx xvfb-maybe aegir test -t electron-main --bail
test-electron-renderer:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx xvfb-maybe aegir test -t electron-renderer --bail
js-test-and-release:
uses: ipdxco/unified-github-workflows/.github/workflows/js-test-and-release.yml@v1.0
secrets:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
```
23 changes: 8 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"bugs": {
"url": "https://github.com/ipfs/aegir/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"keywords": [
"build",
"lint",
Expand Down Expand Up @@ -105,12 +109,13 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
"release": {
"branches": [
"master"
"main"
],
"plugins": [
[
Expand All @@ -134,20 +139,16 @@
"type": "fix",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "deps",
"type": "test",
"release": "patch"
},
{
"type": "test",
"type": "deps",
"release": "patch"
},
{
Expand Down Expand Up @@ -175,14 +176,6 @@
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "docs",
"section": "Documentation"
Expand Down
2 changes: 1 addition & 1 deletion src/check-project/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function getConfig (projectDir) {
.then(res => execa('basename', [res.stdout]))
.then(res => res.stdout)
.catch(() => {
return 'master'
return 'main'
})
const repoUrl = await execa('git', ['remote', 'get-url', 'origin'], {
cwd: projectDir
Expand Down

0 comments on commit abacaa3

Please sign in to comment.