Skip to content

Commit 70a04eb

Browse files
committed
feat: add github workflows
1 parent b3d2566 commit 70a04eb

8 files changed

Lines changed: 4117 additions & 2454 deletions

File tree

.github/renovate.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:base", "schedule:monthly", "group:allNonMajor"],
4+
"rangeStrategy": "bump",
5+
"packageRules": [{ "depTypeList": ["peerDependencies"], "enabled": false }]
6+
}

.github/workflows/release.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
name: Release Full
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
type: choice
9+
description: "Release Version Type"
10+
required: true
11+
default: "patch"
12+
options:
13+
- major
14+
- premajor
15+
- minor
16+
- preminor
17+
- patch
18+
- prepatch
19+
- prerelease
20+
21+
tag:
22+
type: choice
23+
description: "Release Npm Tag"
24+
required: true
25+
default: "latest"
26+
options:
27+
- canary
28+
- nightly
29+
- latest
30+
- beta
31+
- alpha
32+
33+
dry_run:
34+
type: boolean
35+
description: "DryRun release"
36+
required: true
37+
default: false
38+
39+
permissions:
40+
# To publish packages with provenance
41+
id-token: write
42+
43+
jobs:
44+
release:
45+
name: Release
46+
permissions:
47+
contents: write
48+
# To publish packages with provenance
49+
id-token: write
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
56+
- name: Install Pnpm
57+
run: corepack enable
58+
59+
- name: Setup Node.js
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: 20
63+
cache: "pnpm"
64+
65+
- name: Install Dependencies
66+
run: pnpm install
67+
68+
- name: Run Test
69+
run: pnpm run test
70+
71+
- name: Try release to npm
72+
run: pnpm run release
73+
env:
74+
DRY_RUN: ${{ inputs.dry_run }}
75+
TAG: ${{ inputs.tag }}
76+
VERSION: ${{ inputs.version }}
77+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
78+
79+

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow on pull request events but only for the main branch
6+
pull_request:
7+
branches: [main]
8+
push:
9+
branches: [main]
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Install Pnpm
24+
run: corepack enable
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
cache: "pnpm"
31+
32+
- name: Install Dependencies
33+
run: pnpm install
34+
35+
- name: Run Test
36+
run: pnpm run test

.travis.yml

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

package.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "html-rspack-tags-plugin",
3-
"version": "1.0.0",
3+
"version": "0.0.1",
44
"description": "lets you define html tags to inject with HtmlRspackPlugin",
55
"main": "index.js",
66
"types": "typings.d.ts",
@@ -16,12 +16,14 @@
1616
"pretest": "semistandard",
1717
"test": "jasmine",
1818
"testfilter": "jasmine --filter=\"name of suite or test\"",
19-
"debug": "node-debug jasmine"
19+
"debug": "node-debug jasmine",
20+
"release": "node ./scripts/release.mjs"
2021
},
2122
"semistandard": {
2223
"ignore": [
2324
"spec/**/*-bundle.js",
24-
"spec/dist/**"
25+
"spec/dist/**",
26+
"scripts/**"
2527
]
2628
},
2729
"unmockedModulePathPatterns": [
@@ -59,11 +61,20 @@
5961
"rimraf": "^3.0.2",
6062
"semistandard": "^16.0.1",
6163
"style-loader": "^3.3.1",
62-
"@rspack/core": "^1.0.13"
64+
"@rspack/core": "^1.0.13",
65+
"execa": "9.3.0",
66+
"fs-extra": "11.2.0",
67+
"semver": "7.6.3"
6368
},
6469
"dependencies": {
6570
"glob": "^7.2.0",
6671
"minimatch": "^3.0.4",
6772
"slash": "^3.0.0"
73+
},
74+
"packageManager": "pnpm@9.6.0",
75+
"publishConfig": {
76+
"access": "public",
77+
"registry": "https://registry.npmjs.org/",
78+
"provenance": true
6879
}
6980
}

0 commit comments

Comments
 (0)