Skip to content
Merged
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
74 changes: 42 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Release

on:
# push:
# branches:
# - main
push:
branches:
- main
- beta
- alpha
- dev
- rc
pull_request:
branches:
- "*"
Expand All @@ -30,32 +34,38 @@ jobs:
- run: npm ci
- run: npm run test

# publish:
# permissions:
# contents: write
# pull-requests: write
# issues: write
# packages: write
# needs: [test-and-build]
# runs-on: ubuntu-latest

# if: github.ref == 'refs/heads/main'
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0 # Required for semantic-release

# - name: Use Node.js {{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# registry-url: "https://registry.npmjs.org/"

# - run: npm ci
# - run: npm run build

# - name: Run semantic-release
# run: npx semantic-release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish:
permissions:
contents: write
pull-requests: write
issues: write
packages: write
needs: [test-and-build]
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/rc'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for semantic-release

- name: Use Node.js {{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org/"

- run: npm ci
- run: npm run build

- name: Setup Git identity
run: |
git config user.name "semantic-release-bot"
git config user.email "[email protected]"

- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 6 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Don't lint commits in CI
if [ "$CI" = "true" ]; then
exit 0
fi

npm run commitlint ${1}
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ coverage/
node_modules/
src/
.gitignore
.releaserc
commitlint.config.js
jest.config.js
package-lock.json
release.config.js
tsconfig.json
tsconfig.node.json
.npmignore
Expand Down
Empty file added CHANGELOG.md
Empty file.
4 changes: 4 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
ignores: [(commit) => commit.startsWith("chore(release):")],
};
Loading
Loading