Skip to content
Closed
Show file tree
Hide file tree
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
21 changes: 18 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Build
on: [push]

env:
CI_BUILD_NUM: ${{ github.run_id }}
CI_BRANCH: ${{ github.ref_name }}

permissions:
issues: read # needed by semantic-release
pull-requests: write # needed by semantic-release
contents: write # semantic-release-dry verifies the write permissions

jobs:
test:
name: Test
Expand Down Expand Up @@ -30,6 +39,10 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
- name: Semantic Release (Dry Run)
run: npm run semantic-release-dry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
name: Deploy
Expand All @@ -38,8 +51,10 @@ jobs:
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v5
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
- run: npm install
- name: Semantic Release
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
apiToken: ${{secrets.CLOUDFLARE_API_TOKEN}}
accountId: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
18 changes: 18 additions & 0 deletions .github/workflows/semver-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
push:
branches-ignore:
- 'main'

permissions:
pull-requests: write # needed by semantic-release

jobs:
ci_trigger:
runs-on: ubuntu-latest
name: Comment Semantic Release Status
steps:
- name: Comment
id: comment
uses: adobe-rnd/github-semantic-release-comment-action@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .releaserc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
['@semantic-release/changelog', {
changelogFile: 'CHANGELOG.md',
}],
["@semantic-release/npm", {
npmPublish: false,
}],
['@semantic-release/exec', {
prepareCmd: 'npm run deploy:ci && npm run test-postdeploy',
publishCmd: 'npm run deploy:prod',
successCmd: 'echo "${nextRelease.version}" > released.txt',
}],
['@semantic-release/git', {
assets: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}],
'@semantic-release/github'
],
branches: ['main'],
};
Loading