Files
kill-the-news/.github/workflows/release.yml
T
Julien Herr da6494cbd8 ci: pin action versions to SHA + add github-actions to Dependabot
Dependabot will now open PRs when new versions of actions/checkout and
actions/setup-node are released, keeping the pinned SHAs up to date.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 23:34:59 +02:00

45 lines
1.0 KiB
YAML

name: Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
- name: Locate bundled output
id: bundle
run: |
for f in dist/index.js dist/worker.js dist/_worker.js; do
if [ -f "$f" ]; then
echo "path=$f" >> "$GITHUB_OUTPUT"
exit 0
fi
done
echo "No bundled output found in dist/" >&2
exit 1
- name: Upload to GitHub Release
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ github.ref_name }}
run: |
cp "${{ steps.bundle.outputs.path }}" dist/index.js
gh release upload "$TAG_NAME" dist/index.js --clobber