Skip to content

Commit abacaa3

Browse files
committed
chore: update branch references
1 parent 1a4c2b6 commit abacaa3

File tree

6 files changed

+53
-107
lines changed

6 files changed

+53
-107
lines changed

.github/workflows/js-test-and-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: test & maybe release
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
workflow_dispatch:
99

.gitignore

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
/node_modules
2-
/build
3-
/dist
4-
/.docs
5-
/.coverage
6-
/.vscode
1+
node_modules
2+
build
3+
dist
4+
.docs
5+
.coverage
6+
node_modules
77
package-lock.json
88
yarn.lock
9+
.vscode

README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
# aegir
2+
13
[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
24
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
35
[![codecov](https://img.shields.io/codecov/c/github/ipfs/aegir.svg?style=flat-square)](https://codecov.io/gh/ipfs/aegir)
4-
[![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)
6+
[![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)
57

68
> JavaScript project management
79
8-
## Install
10+
# Install
911

1012
```console
1113
$ npm i aegir
1214
```
1315

14-
### Browser `<script>` tag
16+
## Browser `<script>` tag
1517

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

@@ -136,11 +138,11 @@ module.exports = {
136138
}
137139
```
138140
139-
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).
141+
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).
140142
141143
## Continuous Integration
142144
143-
Check this template for Github Actions <https://github.com/ipfs/aegir/blob/master/md/github-actions.md>
145+
Check this template for Github Actions <https://github.com/ipfs/aegir/blob/main/md/github-actions.md>
144146
145147
## Testing helpers
146148
@@ -163,7 +165,7 @@ Aegir will detect the presence of `tsconfig.json` files and build typescript as
163165
7. Generate a changelog based on the git log
164166
8. Commit the version change & `CHANGELOG.md`
165167
9. Create a git tag
166-
10. Run `git push` to `origin/master`
168+
10. Run `git push` to `origin/main`
167169
11. Publish a release to Github releases
168170
12. Generate documentation and push to Github Pages
169171
13. Publish to npm
@@ -172,18 +174,18 @@ Aegir will detect the presence of `tsconfig.json` files and build typescript as
172174
aegir release --help
173175
```
174176
175-
## API Docs
177+
# API Docs
176178
177179
- <https://ipfs.github.io/aegir>
178180
179-
## License
181+
# License
180182
181183
Licensed under either of
182184
183-
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
184-
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
185+
- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/aegir/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
186+
- MIT ([LICENSE-MIT](https://github.com/ipfs/aegir/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
185187
186-
## Contribute
188+
# Contribute
187189
188190
Contributions welcome! Please check out [the issues](https://github.com/ipfs/aegir/issues).
189191

md/github-actions.md

+23-73
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,32 @@
1-
Create a new file called `main.yml` inside `.github/workflows` with the following content:
1+
Create a new file called `js-test-and-release.yml` inside `.github/workflows` with the following content:
22

33
```yml
4-
name: ci
4+
name: test & maybe release
5+
56
on:
67
push:
78
branches:
8-
- master
9+
- main
910
pull_request:
10-
branches:
11-
- master
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: write
15+
id-token: write
16+
packages: write
17+
pull-requests: write
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
21+
cancel-in-progress: true
1222

1323
jobs:
14-
check:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v2
18-
- run: npm install
19-
- run: npx aegir lint
20-
- run: npx aegir build
21-
- run: npx aegir dep-check
22-
- run: npx aegir doc-check
23-
- uses: ipfs/aegir/actions/bundle-size@master
24-
with:
25-
github_token: ${{ secrets.GITHUB_TOKEN }}
26-
test-node:
27-
needs: check
28-
runs-on: ${{ matrix.os }}
29-
strategy:
30-
matrix:
31-
os: [windows-latest, ubuntu-latest, macos-latest]
32-
node: [14, 16]
33-
fail-fast: true
34-
steps:
35-
- uses: actions/checkout@v2
36-
- uses: actions/setup-node@v1
37-
with:
38-
node-version: ${{ matrix.node }}
39-
- run: npm install
40-
- run: npx aegir test -t node --bail --cov
41-
- uses: codecov/codecov-action@v1
42-
test-chrome:
43-
needs: check
44-
runs-on: ubuntu-latest
45-
steps:
46-
- uses: actions/checkout@v2
47-
- uses: microsoft/playwright-github-action@v1
48-
- run: npm install
49-
- run: npx aegir test -t browser --bail --cov
50-
- run: npx aegir test -t webworker --bail
51-
- uses: codecov/codecov-action@v1
52-
test-firefox:
53-
needs: check
54-
runs-on: ubuntu-latest
55-
steps:
56-
- uses: actions/checkout@v2
57-
- uses: microsoft/playwright-github-action@v1
58-
- run: npm install
59-
- run: npx aegir test -t browser -t webworker --bail -- --browser firefox
60-
test-webkit:
61-
needs: check
62-
runs-on: ubuntu-latest
63-
steps:
64-
- uses: actions/checkout@v2
65-
- uses: microsoft/playwright-github-action@v1
66-
- run: npm install
67-
- run: npx aegir test -t browser -t webworker --bail -- --browser webkit
68-
test-electron-main:
69-
needs: check
70-
runs-on: ubuntu-latest
71-
steps:
72-
- uses: actions/checkout@v2
73-
- run: npm install
74-
- run: npx xvfb-maybe aegir test -t electron-main --bail
75-
test-electron-renderer:
76-
needs: check
77-
runs-on: ubuntu-latest
78-
steps:
79-
- uses: actions/checkout@v2
80-
- run: npm install
81-
- run: npx xvfb-maybe aegir test -t electron-renderer --bail
24+
js-test-and-release:
25+
uses: ipdxco/unified-github-workflows/.github/workflows/js-test-and-release.yml@v1.0
26+
secrets:
27+
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
28+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
29+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30+
UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }}
31+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
8232
```

package.json

+8-15
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/ipfs/aegir/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"build",
1620
"lint",
@@ -105,12 +109,13 @@
105109
"eslintConfig": {
106110
"extends": "ipfs",
107111
"parserOptions": {
112+
"project": true,
108113
"sourceType": "module"
109114
}
110115
},
111116
"release": {
112117
"branches": [
113-
"master"
118+
"main"
114119
],
115120
"plugins": [
116121
[
@@ -134,20 +139,16 @@
134139
"type": "fix",
135140
"release": "patch"
136141
},
137-
{
138-
"type": "chore",
139-
"release": "patch"
140-
},
141142
{
142143
"type": "docs",
143144
"release": "patch"
144145
},
145146
{
146-
"type": "deps",
147+
"type": "test",
147148
"release": "patch"
148149
},
149150
{
150-
"type": "test",
151+
"type": "deps",
151152
"release": "patch"
152153
},
153154
{
@@ -175,14 +176,6 @@
175176
"type": "chore",
176177
"section": "Trivial Changes"
177178
},
178-
{
179-
"type": "fix",
180-
"section": "Bug Fixes"
181-
},
182-
{
183-
"type": "chore",
184-
"section": "Trivial Changes"
185-
},
186179
{
187180
"type": "docs",
188181
"section": "Documentation"

src/check-project/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async function getConfig (projectDir) {
5959
.then(res => execa('basename', [res.stdout]))
6060
.then(res => res.stdout)
6161
.catch(() => {
62-
return 'master'
62+
return 'main'
6363
})
6464
const repoUrl = await execa('git', ['remote', 'get-url', 'origin'], {
6565
cwd: projectDir

0 commit comments

Comments
 (0)