Skip to content

Commit

Permalink
Add bundles to releases
Browse files Browse the repository at this point in the history
Based on a suggestion by @paulmillr.

Closes #21
  • Loading branch information
FiloSottile committed Jul 23, 2024
1 parent 1b477a9 commit 990b973
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and upload bundle
on:
release:
types: [published]
push:
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm install
- run: npm run build
- run: npx --yes [email protected] --target=es6 --bundle --minify
--outfile=age-esbuild.js --global-name=age .
- uses: actions/upload-artifact@v4
with:
name: age-esbuild
path: age-esbuild.js
upload:
if: github.event_name == 'release'
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: age-esbuild
- run: gh release upload "$VERSION" "age-esbuild.js#age-${VERSION#v}.min.js"
env:
VERSION: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ github.token }}

0 comments on commit 990b973

Please sign in to comment.