Skip to content

Commit 3e72fd4

Browse files
committed
chore: move release into the ci workflow
1 parent c9a2c6c commit 3e72fd4

File tree

3 files changed

+22
-31
lines changed

3 files changed

+22
-31
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,24 @@ jobs:
4343
run: npm run ci:test
4444
- name: Report code coverage
4545
uses: codecov/codecov-action@v2
46+
release:
47+
runs-on: ubuntu-latest
48+
needs: [lint, test]
49+
steps:
50+
- name: Check releasable
51+
if: ${{ github.repository == 'marko-js/htmljs-parser' && github.ref == 'refs/heads/next' && github.event_name == 'push' }}
52+
run: exit 0
53+
- name: Checkout code
54+
uses: actions/checkout@v2
55+
- name: Setup node
56+
uses: actions/setup-node@v2
57+
with:
58+
node-version: 16.x
59+
cache: "npm"
60+
- name: Install dependencies
61+
run: npm ci
62+
- name: Release
63+
run: npm run release
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.releaserc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{
2-
"branches": [
3-
"main",
4-
{ "name": "next", "channel": "next", "prerelease": true }
5-
]
2+
"branches": ["+([0-9])?(.{+([0-9]),x}).x", "main", "next"]
63
}

0 commit comments

Comments
 (0)