Skip to content

Commit

Permalink
Switch build from rollup to ophidian+esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed Jul 10, 2022
1 parent e38e48d commit 5b045da
Show file tree
Hide file tree
Showing 11 changed files with 528 additions and 3,067 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

17 changes: 15 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: pnpm/[email protected]
with:
version: 6.32.19
- name: Create release and Upload
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_MESSAGE: ${{ github.event.commits[0].message }}
run: |
PLUGIN_NAME=$(jq -r .id manifest.json)
PLUGIN_NAME=${PLUGIN_NAME:-${GITHUB_REPOSITORY##*/}}
Expand All @@ -28,14 +35,20 @@ jobs:
exit 1
fi
pnpm install
pnpm build
rm -f dist/main.css
mkdir "${PLUGIN_NAME}"
assets=()
for f in main.js manifest.json styles.css; do
for f in main.js manifest*.json styles.css; do
if [[ -f dist/$f ]] && [[ ! -f $f ]]; then
mv dist/$f $f;
fi
if [[ -f $f ]]; then
cp $f "${PLUGIN_NAME}/"
assets+=(-a "$f")
fi
done
zip -r "$PLUGIN_NAME".zip "$PLUGIN_NAME"
hub release create "${assets[@]}" -a "$PLUGIN_NAME".zip -m "$TAG_NAME" "$TAG_NAME"
hub release create "${assets[@]}" -a "$PLUGIN_NAME".zip -m "$TAG_NAME" -m "### $COMMIT_MESSAGE" "$TAG_NAME"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
dist
Loading

0 comments on commit 5b045da

Please sign in to comment.