Skip to content

Commit

Permalink
feat: create bundled release on github pages
Browse files Browse the repository at this point in the history
* chore: create bundled releases of eye

* chore: version by folders

* chore: create script to add latest folders

* chore: add steps to move bundle to pages branch
  • Loading branch information
jeswr authored Jan 15, 2023
1 parent 248b2cc commit 5aa52ec
Show file tree
Hide file tree
Showing 6 changed files with 779 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Deploy Bundled Release"

on:
create

jobs:
tagged-release:
# Don't run on releases/tags/* which causes recursive behaviour
if: startsWith(github.ref, 'refs/tags/')
name: "Deploy Bundled Release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- name: Create latest bundle and add to github pages
run: |
# Build the latest bundle
npm ci
npm run bundle:webpack -- --name=${{ github.ref_name }}
npm run bundle:latest -- --name=${{ github.ref_name }}
# Configure Git
git config --global user.name 'Jesse Wright'
git config --global user.email '63333554+jeswr@users.noreply.github.com'
# Move the latest bundle changes onto the pages branch and push
git add -f bundle/
git fetch origin origin/pages
git checkout -t origin/pages
git commit -m "feat: add bundle for ${{ github.ref_name }}"
git push -u origin pages
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
coverage
dist
bundle
lib/eye.ts
Loading

0 comments on commit 5aa52ec

Please sign in to comment.