@daiyam/artifact-npm 0.7.0 → 0.7.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.
@@ -1,12 +1,15 @@
1
1
  name: Publish Package
2
+
2
3
  on:
3
- workflow_dispatch: null
4
+ workflow_dispatch: {}
4
5
  push:
5
6
  tags:
6
7
  - v*
8
+
7
9
  permissions:
8
10
  id-token: write # NPM
9
11
  contents: write # Release
12
+
10
13
  jobs:
11
14
  publish:
12
15
  runs-on: ubuntu-latest
@@ -16,6 +19,7 @@ jobs:
16
19
  with:
17
20
  fetch-depth: 0
18
21
  persist-credentials: false
22
+
19
23
  - name: Get Version
20
24
  run: |
21
25
  # Get the latest tag
@@ -26,10 +30,11 @@ jobs:
26
30
  fi
27
31
  echo "VERSION=$LATEST_TAG" >> $GITHUB_ENV
28
32
  echo "Using version: $LATEST_TAG"
33
+
29
34
  - name: Check Existing Release
30
35
  run: |
31
36
  # Try to get the release information
32
- RELEASE_INFO=$(gh release view ${{ env.VERSION }} --json assets,url 2>/dev/null || echo "")
37
+ RELEASE_INFO=$(gh release view ${VERSION} --json assets,url 2>/dev/null || echo "")
33
38
  if [ ! -z "$RELEASE_INFO" ]; then
34
39
  echo "Release exists"
35
40
  echo "RELEASE_EXISTS=yes" >> $GITHUB_ENV
@@ -45,20 +50,23 @@ jobs:
45
50
  fi
46
51
  env:
47
52
  GH_TOKEN: ${{ github.token }}
53
+
48
54
  - name: Download Existing TGZ
49
55
  if: env.RELEASE_EXISTS == 'yes' && env.TGZ_URL != ''
50
56
  run: |
51
- gh api ${{ env.TGZ_URL }} --header 'Accept: application/octet-stream' > ${{ env.TGZ_NAME }}
52
- echo "CHECKSUM=$(sha256sum ${{ env.TGZ_NAME }} | cut -d ' ' -f 1)" >> $GITHUB_ENV
57
+ gh api ${TGZ_URL} --header 'Accept: application/octet-stream' > ${TGZ_NAME}
58
+ echo "CHECKSUM=$(sha256sum ${TGZ_NAME} | cut -d ' ' -f 1)" >> $GITHUB_ENV
53
59
  env:
54
60
  GH_TOKEN: ${{ github.token }}
61
+
55
62
  - name: Setup Node.js
56
63
  if: env.RELEASE_EXISTS == 'no'
57
64
  uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
58
65
  with:
59
- node-version: "24"
66
+ node-version: latest
60
67
  registry-url: https://registry.npmjs.org
61
68
  package-manager-cache: false
69
+
62
70
  - name: Build
63
71
  if: env.RELEASE_EXISTS == 'no'
64
72
  run: |
@@ -69,15 +77,17 @@ jobs:
69
77
  echo "TGZ_NAME=$TGZ_NAME" >> $GITHUB_ENV
70
78
  echo "CHECKSUM=$CHECKSUM" >> $GITHUB_ENV
71
79
  echo "$CHECKSUM" > "$TGZ_NAME.sha256"
80
+
72
81
  - name: Get Changelog
73
82
  if: env.RELEASE_EXISTS == 'no'
74
83
  run: |
75
- CHANGELOG_ENTRY=$(node .github/scripts/get-changelog.js ${{ env.VERSION }})
84
+ CHANGELOG_ENTRY=$(node .github/scripts/get-changelog.js ${VERSION})
76
85
  # Properly handle multiline output in GitHub Actions
77
86
  EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
78
87
  echo "CHANGELOG_ENTRY<<$EOF" >> $GITHUB_ENV
79
88
  echo "$CHANGELOG_ENTRY" >> $GITHUB_ENV
80
89
  echo "$EOF" >> $GITHUB_ENV
90
+
81
91
  - name: Release
82
92
  if: env.RELEASE_EXISTS == 'no'
83
93
  uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
@@ -97,5 +107,6 @@ jobs:
97
107
  ```
98
108
  ${{ env.CHECKSUM }}
99
109
  ```
110
+
100
111
  - name: Publish to NPM Registry
101
- run: npm publish --access=public
112
+ run: npm publish --provenance --access=public
@@ -2,4 +2,4 @@ rules:
2
2
  superfluous-actions:
3
3
  ignore:
4
4
  # allows `softprops/action-gh-release` action
5
- - publish.yml:83
5
+ - publish.yml:93
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daiyam/artifact-npm",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "The configuration to create node modules and publish them on npm.",
5
5
  "author": {
6
6
  "name": "Baptiste Augrain",
@@ -31,5 +31,5 @@
31
31
  "project-template",
32
32
  "scaffold"
33
33
  ],
34
- "gitHead": "0ca975f24ab580f624d50e16041de3e48014f5cf"
34
+ "gitHead": "6c3e6970d79755e6a60f51a0653fc66702973eb2"
35
35
  }