Skip to content

Commit

Permalink
Fix CI build/publish (#224)
Browse files Browse the repository at this point in the history
* Fix CI and switch output folder from build to dist

* Fix CI and switch output folder from build to dist

* Fix example build script

* Bump minor

* Fix upload-artifact version
  • Loading branch information
bencmbrook authored Jun 15, 2022
1 parent 6962eec commit 667ef03
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: ./.github/commands/dependencies/install_yarn_deps
- name: Build the typescript code
- name: Build
run: yarn build
- uses: actions/upload-artifact@main
- uses: actions/upload-artifact@v3
with:
name: build artifacts
path: build/
name: build-artifact
path: |
dist/
ts-build/
run-karma:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,6 +60,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- uses: ./.github/commands/dependencies/install_yarn_deps
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: build-artifact
- name: Configure NPM authentication
run: |
yarn config set npmAlwaysAuth true
Expand All @@ -78,6 +84,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- uses: ./.github/commands/dependencies/install_yarn_deps
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: build-artifact
- name: Configure Github Packages authentication
run: |
yarn config set npmAlwaysAuth true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Autogenerated output
build
dist
ts-build/
.expo/
stats.json
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ const PENUMBRA_DIRECTORY = path.join(
__dirname,
'node_modules',
'@transcend-io/penumbra',
'build',
'dist',
);

module.exports = {
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@transcend-io/penumbra",
"version": "5.2.3",
"version": "5.3.0",
"description": "Crypto streams for the browser.",
"main": "build/main.penumbra.js",
"main": "dist/main.penumbra.js",
"types": "ts-build/src/index.d.ts",
"directories": {
"example": "example"
Expand All @@ -21,18 +21,18 @@
"####### Linting #######": "",
"lint": "yarn pnpify eslint src --ext .ts",
"####### Start #########": "",
"start:example": "yarn build:example && http-server example/build/ -o",
"start:demo": "yarn build:demo && http-server demo/build/ -o",
"start:example": "yarn build:example && http-server example/build/ --port 8080 -o",
"start:demo": "yarn build:demo && http-server demo/build/ --port 8081 -o",
"####### Testing #######": "",
"test:interactive": "yarn start:demo",
"test:local": "karma start karma.local.js",
"test:local:rebuild": "yarn && karma start karma.local.js",
"test:browserstack": "karma start karma.browserstack.js",
"####### Build #######": "",
"clean": "rimraf build && rimraf coverage",
"build": "yarn clean && mkdir -p build && webpack --config webpack.prod.js && tsc",
"build:example": "rimraf example/build && yarn build && mkdir -p demo/build && cp -a example/. build/ && cp -a build/. example/build/",
"build:demo": "rimraf demo/build && yarn build && mkdir -p demo/build && cp -a demo/. build/ && cp -a build/. demo/build/",
"build": "yarn clean && mkdir -p dist && webpack --config webpack.prod.js && tsc",
"build:example": "rimraf example/build && yarn build && mkdir -p example/build && cp -a example/. dist/ && cp -a dist/. example/build/",
"build:demo": "rimraf demo/build && yarn build && mkdir -p demo/build && cp -a demo/. dist/ && cp -a dist/. demo/build/",
"webpack:watch": "yarn clean && webpack --config webpack.dev.js --watch"
},
"repository": {
Expand All @@ -54,7 +54,7 @@
"url": "https://github.com/transcend-io/penumbra/issues"
},
"files": [
"build/**/*",
"dist/**/*",
"ts-build/**/*",
"src/**/*",
"tsconfig.json"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
]
},
"include": ["src/**/*", "!src/tests"],
"exclude": ["node_modules", "build"]
"exclude": ["node_modules", "dist"]
}
2 changes: 1 addition & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
},
output: {
filename: '[name].penumbra.js',
path: join(__dirname, 'build'),
path: join(__dirname, 'dist'),
},
resolve: {
extensions: ['.ts', '.js'],
Expand Down

0 comments on commit 667ef03

Please sign in to comment.