Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch from semantic release to changesets #95

Merged
merged 1 commit into from
Apr 26, 2022
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.7.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "marko-js/htmljs-parser"
}
],
"updateInternalDependencies": "patch",
"baseBranch": "main",
"access": "public",
"commit": false,
"linked": [],
"ignore": [],
"fixed": []
}
5 changes: 5 additions & 0 deletions .changeset/thirty-dolphins-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"htmljs-parser": patch
---

Switch from semantic-release to changesets
44 changes: 29 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,35 @@ name: CI

on:
pull_request:
types: [opened, synchronize]
paths-ignore: ["**.md"]
push:
branches: ["main", "next"]
branches: [main, next]
paths-ignore: ["**.md"]

jobs:
lint:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: "npm"
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Format Code
run: npm run format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[ci] format"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -31,12 +40,12 @@ jobs:
node: [14.x, 16.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use node@${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: "npm"
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
Expand All @@ -45,22 +54,27 @@ jobs:
uses: codecov/codecov-action@v2
release:
runs-on: ubuntu-latest
needs: [lint, test]
needs: [format, test]
if: ${{ github.repository == 'marko-js/htmljs-parser' && github.event_name == 'push' }}
steps:
- name: Check releasable
if: ${{ github.repository == 'marko-js/htmljs-parser' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next') }}
run: exit 0
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: "npm"
cache: npm
- name: Install dependencies
run: npm ci
- name: Release
run: npm run release
id: changesets
uses: changesets/action@v1
with:
createGithubReleases: true
version: npm run version
publish: npm run publish
commit: "[ci] release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 0 additions & 3 deletions .releaserc.json

This file was deleted.

Loading