removed github actions
This commit is contained in:
5 files changed
-181
No files matched your search
@@ -1 +0,0 @@
|
|||||||
github: [juherr]
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: "npm"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
groups:
|
|
||||||
dev-dependencies:
|
|
||||||
dependency-type: "development"
|
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
paths-ignore:
|
|
||||||
- "docs/**"
|
|
||||||
pull_request:
|
|
||||||
branches: ["main"]
|
|
||||||
paths-ignore:
|
|
||||||
- "docs/**"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ci:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
||||||
|
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- run: npm ci
|
|
||||||
|
|
||||||
- name: Format check
|
|
||||||
run: npm run format:check
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: npm run lint
|
|
||||||
|
|
||||||
- name: Type check
|
|
||||||
run: npm run typecheck
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: npm test
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
name: Deploy Demo
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["CI"]
|
|
||||||
types: [completed]
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy-demo:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
||||||
|
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- run: npm ci
|
|
||||||
|
|
||||||
- name: Generate wrangler.toml
|
|
||||||
env:
|
|
||||||
DEMO_KV_NAMESPACE_ID: ${{ secrets.DEMO_KV_NAMESPACE_ID }}
|
|
||||||
run: |
|
|
||||||
COMPAT_DATE=$(date +%Y-%m-%d)
|
|
||||||
sed \
|
|
||||||
-e "s/REPLACE_WITH_COMPATIBILITY_DATE/${COMPAT_DATE}/g" \
|
|
||||||
-e "s/REPLACE_WITH_YOUR_KV_NAMESPACE_ID/${DEMO_KV_NAMESPACE_ID}/g" \
|
|
||||||
-e "s/REPLACE_WITH_YOUR_PREVIEW_KV_NAMESPACE_ID/${DEMO_KV_NAMESPACE_ID}/g" \
|
|
||||||
-e "s/REPLACE_WITH_DEMO_KV_NAMESPACE_ID/${DEMO_KV_NAMESPACE_ID}/g" \
|
|
||||||
-e "s/REPLACE_WITH_YOUR_DOMAIN/kill-the.news/g" \
|
|
||||||
wrangler-example.toml > wrangler.toml
|
|
||||||
|
|
||||||
- name: Deploy to demo
|
|
||||||
run: npx wrangler deploy --env demo
|
|
||||||
env:
|
|
||||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
||||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
||||||
|
|
||||||
- name: Set demo admin password
|
|
||||||
run: echo "$DEMO_ADMIN_PASSWORD" | npx wrangler secret put ADMIN_PASSWORD --env demo
|
|
||||||
env:
|
|
||||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
||||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
||||||
DEMO_ADMIN_PASSWORD: ${{ secrets.DEMO_ADMIN_PASSWORD }}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
name: Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
||||||
|
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- run: npm ci
|
|
||||||
|
|
||||||
# The tagged commit is the release: `npm run release` commits the bare
|
|
||||||
# X.Y.Z to it (main otherwise carries a `-develop` suffix). Verify the tag
|
|
||||||
# matches that committed version exactly — this catches tagging the wrong
|
|
||||||
# commit (e.g. a `-develop` one) without rewriting anything.
|
|
||||||
- name: Verify package.json matches the tag
|
|
||||||
env:
|
|
||||||
TAG_NAME: ${{ github.ref_name }}
|
|
||||||
run: |
|
|
||||||
VERSION="${TAG_NAME#v}"
|
|
||||||
PKG="$(node -p 'require("./package.json").version')"
|
|
||||||
if [ "$VERSION" != "$PKG" ]; then
|
|
||||||
echo "Tag $TAG_NAME does not match package.json ($PKG)." >&2
|
|
||||||
echo "The tagged commit must carry the bare release version ($VERSION)." >&2
|
|
||||||
echo "Cut releases with: npm run release $VERSION" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Release notes come from the CHANGELOG section for this version, which is
|
|
||||||
# written incrementally and reviewed in PRs — never hand-typed at release.
|
|
||||||
- name: Extract release notes from CHANGELOG
|
|
||||||
env:
|
|
||||||
TAG_NAME: ${{ github.ref_name }}
|
|
||||||
run: |
|
|
||||||
VERSION="${TAG_NAME#v}"
|
|
||||||
awk -v ver="$VERSION" '
|
|
||||||
$0 ~ "^## \\[" ver "\\]" {grab=1; next}
|
|
||||||
/^## \[/ && grab {exit}
|
|
||||||
grab { if (!started && $0 ~ /^[[:space:]]*$/) next; started=1; print }
|
|
||||||
' CHANGELOG.md > release-notes.md
|
|
||||||
if [ ! -s release-notes.md ]; then
|
|
||||||
echo "No CHANGELOG section found for $VERSION." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Release notes for $VERSION:"
|
|
||||||
cat release-notes.md
|
|
||||||
|
|
||||||
- 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: Create GitHub Release and upload bundle
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
TAG_NAME: ${{ github.ref_name }}
|
|
||||||
BUNDLE_PATH: ${{ steps.bundle.outputs.path }}
|
|
||||||
run: |
|
|
||||||
gh release create "$TAG_NAME" --title "$TAG_NAME" --notes-file release-notes.md --verify-tag || true
|
|
||||||
gh release upload "$TAG_NAME" "$BUNDLE_PATH" --clobber
|
|
||||||
Reference in new issue
Block a user