Skip to content

Commit c577179

Browse files
committed
chore: switch from semantic release to changesets
1 parent 700d38f commit c577179

File tree

7 files changed

+7039
-10191
lines changed

7 files changed

+7039
-10191
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@1.7.0/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "marko-js/htmljs-parser"
7+
}
8+
],
9+
"updateInternalDependencies": "patch",
10+
"baseBranch": "main",
11+
"access": "public",
12+
"commit": false,
13+
"linked": [],
14+
"ignore": [],
15+
"fixed": []
16+
}

.changeset/thirty-dolphins-move.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"htmljs-parser": patch
3+
---
4+
5+
Switch from semantic-release to changesets

.github/workflows/ci.yml

+29-15
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,35 @@ name: CI
22

33
on:
44
pull_request:
5+
types: [opened, synchronize]
56
paths-ignore: ["**.md"]
67
push:
7-
branches: ["main", "next"]
8+
branches: [main, next]
89
paths-ignore: ["**.md"]
910

1011
jobs:
11-
lint:
12+
format:
1213
runs-on: ubuntu-latest
1314
steps:
1415
- name: Checkout code
15-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1617
- name: Use node
1718
uses: actions/setup-node@v2
1819
with:
1920
node-version: 16.x
20-
cache: "npm"
21+
cache: npm
2122
- name: Install dependencies
2223
run: npm ci
23-
- name: Lint code
24-
run: npm run lint
24+
- name: Format Code
25+
run: npm run format
26+
- name: Commit changes
27+
uses: stefanzweifel/git-auto-commit-action@v4
28+
with:
29+
commit_message: "[ci] format"
30+
commit_user_name: "github-actions[bot]"
31+
commit_user_email: "github-actions[bot]@users.noreply.github.com"
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2534
test:
2635
runs-on: ${{ matrix.os }}
2736
strategy:
@@ -31,12 +40,12 @@ jobs:
3140
node: [14.x, 16.x]
3241
steps:
3342
- name: Checkout code
34-
uses: actions/checkout@v2
43+
uses: actions/checkout@v3
3544
- name: Use node@${{ matrix.node }}
3645
uses: actions/setup-node@v2
3746
with:
3847
node-version: ${{ matrix.node }}
39-
cache: "npm"
48+
cache: npm
4049
- name: Install dependencies
4150
run: npm ci
4251
- name: Run tests
@@ -45,22 +54,27 @@ jobs:
4554
uses: codecov/codecov-action@v2
4655
release:
4756
runs-on: ubuntu-latest
48-
needs: [lint, test]
57+
needs: [format, test]
58+
if: ${{ github.repository == 'marko-js/htmljs-parser' && github.event_name == 'push' }}
4959
steps:
50-
- name: Check releasable
51-
if: ${{ github.repository == 'marko-js/htmljs-parser' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next') }}
52-
run: exit 0
5360
- name: Checkout code
54-
uses: actions/checkout@v2
61+
uses: actions/checkout@v3
5562
- name: Setup node
5663
uses: actions/setup-node@v2
5764
with:
5865
node-version: 16.x
59-
cache: "npm"
66+
cache: npm
6067
- name: Install dependencies
6168
run: npm ci
6269
- name: Release
63-
run: npm run release
70+
id: changesets
71+
uses: changesets/action@v1
72+
with:
73+
createGithubReleases: true
74+
version: npm run version
75+
publish: npm run publish
76+
commit: "[ci] release"
77+
title: "[ci] release"
6478
env:
6579
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6680
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc.json

-3
This file was deleted.

0 commit comments

Comments
 (0)