milkee 0.0.0 โ 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +33 -27
- package/package.json +3 -3
@@ -1,41 +1,47 @@
|
|
1
|
-
name:
|
1
|
+
name: Manual Publish to npm
|
2
2
|
|
3
3
|
on:
|
4
|
-
|
5
|
-
tags:
|
6
|
-
- "v*"
|
4
|
+
workflow_dispatch:
|
7
5
|
|
8
6
|
jobs:
|
9
|
-
publish:
|
10
|
-
|
11
|
-
runs-on: ${{ matrix.os }}
|
12
|
-
timeout-minutes: 10
|
13
|
-
strategy:
|
14
|
-
matrix:
|
15
|
-
node-version: [20.x]
|
16
|
-
os: [ubuntu-latest]
|
17
|
-
|
7
|
+
publish-npm:
|
8
|
+
runs-on: ubuntu-latest
|
18
9
|
permissions:
|
19
|
-
contents: read
|
20
10
|
id-token: write
|
21
|
-
|
11
|
+
contents: write
|
22
12
|
steps:
|
23
|
-
- name: Checkout
|
13
|
+
- name: Checkout repository
|
24
14
|
uses: actions/checkout@v4
|
25
15
|
|
26
|
-
- name: Setup Node.js
|
16
|
+
- name: Setup Node.js
|
27
17
|
uses: actions/setup-node@v4
|
28
18
|
with:
|
29
|
-
node-version:
|
30
|
-
registry-url:
|
31
|
-
|
32
|
-
- name: Install
|
33
|
-
run:
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
- name:
|
19
|
+
node-version: "20.x"
|
20
|
+
registry-url: "https://registry.npmjs.org"
|
21
|
+
|
22
|
+
- name: Install, Build, and Test
|
23
|
+
run: |
|
24
|
+
npm ci
|
25
|
+
npm run build
|
26
|
+
npm test
|
27
|
+
|
28
|
+
- name: Commit dist directory (if changed)
|
29
|
+
run: |
|
30
|
+
git config --global user.name "github-actions[bot]"
|
31
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
32
|
+
git add dist
|
33
|
+
# The following command creates a commit ONLY if there are staged changes.
|
34
|
+
git diff --staged --quiet || git commit -m "chore: update build artifacts"
|
35
|
+
git push
|
36
|
+
|
37
|
+
- name: Publish to npm
|
39
38
|
run: npm publish --provenance --access public
|
40
39
|
env:
|
41
40
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
41
|
+
|
42
|
+
- name: Create and Push Git Tag
|
43
|
+
run: |
|
44
|
+
# This step now runs after the dist commit, ensuring the tag points to the correct commit.
|
45
|
+
VERSION=$(node -p "require('./package.json').version")
|
46
|
+
git tag "v$VERSION"
|
47
|
+
git push origin "v$VERSION"
|
package/package.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "milkee",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1",
|
4
4
|
"description": "A simple CoffeeScript build tool with coffee.config.js",
|
5
5
|
"main": "dist/cli.js",
|
6
6
|
"bin": {
|
7
7
|
"milkee": "dist/cli.js"
|
8
8
|
},
|
9
9
|
"scripts": {
|
10
|
-
"
|
11
|
-
"
|
10
|
+
"test": "echo \"No test specified\" && exit 0",
|
11
|
+
"build": "coffee --output dist/ --compile src/"
|
12
12
|
},
|
13
13
|
"repository": {
|
14
14
|
"type": "git",
|