Skip to content

Release

Release #66

Workflow file for this run

name: Release
on:
schedule:
- cron: "27 */6 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Clone the esbuild repo
run: |
git clone --depth 1 https://github.com/evanw/esbuild.git
- name: Read version info
run: |
echo "ESBUILD_VERSION=$(cat esbuild/version.txt)" >> $GITHUB_ENV
- name: Check for "dl/v${{ env.ESBUILD_VERSION }}"
id: file-check
continue-on-error: true
run: |
test -f "dl/v$ESBUILD_VERSION"
- if: steps.file-check.outcome == 'failure'
name: Create "dl/v${{ env.ESBUILD_VERSION }}"
run: |
cat esbuild/dl.sh | sed "s/\$ESBUILD_VERSION/$ESBUILD_VERSION/" > "dl/v$ESBUILD_VERSION"
- if: steps.file-check.outcome == 'failure'
name: Update "dl/latest"
run: |
cat esbuild/dl.sh | sed "s/\$ESBUILD_VERSION/$ESBUILD_VERSION/" > dl/latest
- if: steps.file-check.outcome == 'failure'
name: Commit and push
run: |
git config --global user.name GitHub
git config --global user.email '[email protected]'
git status
git add dl/latest "dl/v$ESBUILD_VERSION"
git commit -m "publish download script for $ESBUILD_VERSION"
git push origin gh-pages