Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(webpack): Fix release process for Tecrocks Table #336

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- run: >-
aws s3 cp
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/${{ env.SRC_FILE }}
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/index.html
- run: |-
433eros marked this conversation as resolved.
Show resolved Hide resolved
aws s3 cp \
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/${{ env.SRC_FILE }} \
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/index.html
aws s3 cp \
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/tecrock-table/${{ env.SRC_FILE }} \
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/tecrock-table/index.html
aws s3 cp \
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/tecrock-table/version.json \
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/tecrock-table/version.json
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
4 changes: 4 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion packages/tecrock-table/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');

const webpackCommon = require('./webpack-common.config.js');

const DEPLOY_PATH = process.env.DEPLOY_PATH;

module.exports = (env, argv) => {
const interactiveName = path.basename(__dirname); // e.g. "open-response"

return webpackCommon(env, argv, __dirname, {
stats: {
children: true,
},
// Add custom webpack configuration here
entry: {
[`${interactiveName}`]: './src/index.tsx'
Expand All @@ -18,7 +23,12 @@ module.exports = (env, argv) => {
chunks: [interactiveName],
filename: `${interactiveName}/index.html`,
template: './index.html'
})
}),
...(DEPLOY_PATH ? [new HtmlWebpackPlugin({
filename: 'tecrock-table/index-top.html',
template: './index.html',
publicPath: DEPLOY_PATH,
})] : [])
]
});
};
Loading