Skip to content
Open
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
48 changes: 48 additions & 0 deletions .github/workflows/prerelease-tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Prerelease Tarball

on:
push:
branches: [main]
# Manually trigger to pull in the latest CDK constructs changes
workflow_dispatch:

permissions:
contents: write

concurrency:
group: prerelease-tarball
cancel-in-progress: true

jobs:
prerelease-tarball:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '20.x'
cache: 'npm'
- uses: astral-sh/setup-uv@v7
- run: npm run bundle
- name: Get tarball info
id: tarball
run: |
TARBALL_NAME=$(ls *.tgz | head -1 | xargs basename)
echo "name=$TARBALL_NAME" >> $GITHUB_OUTPUT
- name: Create or update prerelease
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARBALL_NAME: ${{ steps.tarball.outputs.name }}
run: |
TAG="prerelease"

# Delete existing release if it exists (to update the tarball)
gh release delete "$TAG" --yes --cleanup-tag 2>/dev/null || true
Comment thread
Hweinstock marked this conversation as resolved.

# Create a new pre-release with the tarball
gh release create "$TAG" \
"${TARBALL_NAME}" \
--title "Prerelease" \
--notes "Auto-generated tarball from the latest commit on main." \
--prerelease \
--target "${{ github.sha }}"
Loading