mirror of
https://github.com/lukaszraczylo/cloudflare-crawl-mcp.git
synced 2026-06-10 23:28:49 +00:00
Update.
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
name: Test and Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- "**/release.yml"
|
||||
- "static/**"
|
||||
- "docs/**"
|
||||
pull_request:
|
||||
branches: [main]
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -24,16 +33,34 @@ jobs:
|
||||
release:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'release'
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Calculate version
|
||||
id: version
|
||||
uses: lukaszraczylo/shared-actions/.github/actions/semver@main
|
||||
with:
|
||||
config-file: semver.yaml
|
||||
|
||||
- name: Create tag
|
||||
if: steps.version.outputs.version_tag != ''
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git tag ${{ steps.version.outputs.version_tag }}
|
||||
git push origin ${{ steps.version.outputs.version_tag }}
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
if: steps.version.outputs.version_tag != ''
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
|
||||
- name: Run GoReleaser
|
||||
if: steps.version.outputs.version_tag != ''
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: latest
|
||||
|
||||
Reference in New Issue
Block a user