Skip to content

Commit

Permalink
chore: switch from semantic release to changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Apr 26, 2022
1 parent 700d38f commit c577179
Show file tree
Hide file tree
Showing 7 changed files with 7,039 additions and 10,191 deletions.
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

0 comments on commit c577179

Please sign in to comment.