Skip to content
Open
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
11 changes: 5 additions & 6 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This repository uses a comprehensive set of GitHub Actions workflows for continu
5. `dependency-review` - Reviews new dependencies
6. `status-check` - Aggregates all job results

### 🚀 Release Pipeline (`bump.yml` → `publish.yml`)
### 🚀 Release Pipeline (`release.yml` → `publish.yml`)

**Triggers:**

Expand Down Expand Up @@ -93,29 +93,28 @@ This repository uses a comprehensive set of GitHub Actions workflows for continu
Add these secrets in GitHub repository settings:

```
NPM_TOKEN - NPM publishing token
CODECOV_TOKEN - Codecov upload token (optional)
```

### Repository Settings

1. **Environments**: Create `npm-publish` environment for publish protection
2. **Branch Protection**: Enable required status checks on main/master
3. **Actions Permissions**: Allow GitHub Actions to create and approve pull requests
3. **Actions Permissions**: Allow GitHub Actions to create releases and push tags

### NPM Setup

1. Create NPM account and organization
2. Generate automation token with publish permissions
3. Add token as `NPM_TOKEN` secret
2. Configure npm trusted publishing for this repository
3. Grant publish permission through npm package settings

## Usage Examples

### Manual Release

```bash
# Trigger manual release with specific version type
gh workflow run bump.yml -f version-type=minor
gh workflow run release.yml -f version-type=minor
```

### Emergency Publish
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
outputs:
version: ${{ steps.package.outputs.version }}
prerelease: ${{ steps.package.outputs.prerelease }}
permissions:
contents: read
id-token: write # Required for trusted publishing
Expand All @@ -46,11 +49,8 @@ jobs:
- name: Build package
run: npm run build

- name: Check package contents
run: |
npm pack --dry-run
echo "Package contents:"
tar -tzf $(npm pack --dry-run 2>/dev/null | tail -1) | head -20
- name: Validate package archive
run: npm pack --dry-run

- name: Get package info
id: package
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:

- name: Commit and tag
run: |
git add package.json CHANGELOG.md
git add package.json package-lock.json CHANGELOG.md
git commit -m "chore(release): bump version to ${{ steps.version.outputs.new_version }}"
git tag ${{ steps.version.outputs.tag }}
git push origin HEAD --tags
Expand All @@ -128,7 +128,7 @@ jobs:
## Installation

```bash
npm install @typeup/dom@${{ steps.version.outputs.new_version }}
npm install @typeup/parser@${{ steps.version.outputs.new_version }}
```
draft: false
prerelease: ${{ contains(steps.version.outputs.new_version, '-') }}
6 changes: 3 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export default defineConfig({
enabled: true,
cleanOnRerun: true,
thresholds: {
statements: 70,
statements: 65,
branches: 50,
functions: 70,
lines: 70,
functions: 65,
lines: 65,
},
},
globals: true,
Expand Down
Loading