|
25 | 25 | - uses: dtolnay/rust-toolchain@stable |
26 | 26 | - uses: Swatinem/rust-cache@v2 |
27 | 27 |
|
28 | | - - name: Install esbuild (for harmont-ts bundle) |
29 | | - working-directory: crates/hm-dsl-engine/harmont-ts |
30 | | - run: npm ci |
31 | | - |
32 | 28 | - name: Set version from tag |
33 | 29 | run: | |
34 | 30 | VERSION="${GITHUB_REF_NAME#v}" |
@@ -181,52 +177,6 @@ jobs: |
181 | 177 | cargo publish -p harmont-cli --token ${{ secrets.CRATES_IO_TOKEN }} --allow-dirty --no-verify |
182 | 178 | fi |
183 | 179 |
|
184 | | - npm: |
185 | | - name: Publish to npm |
186 | | - runs-on: ubuntu-latest |
187 | | - timeout-minutes: 10 |
188 | | - permissions: |
189 | | - contents: read |
190 | | - id-token: write |
191 | | - steps: |
192 | | - - uses: actions/checkout@v4 |
193 | | - |
194 | | - - uses: actions/setup-node@v4 |
195 | | - with: |
196 | | - node-version: "20" |
197 | | - registry-url: "https://registry.npmjs.org" |
198 | | - cache: npm |
199 | | - cache-dependency-path: crates/hm-dsl-engine/harmont-ts/package-lock.json |
200 | | - |
201 | | - # node 20 ships npm 10, which can sign provenance but cannot AUTHENTICATE |
202 | | - # via OIDC trusted publishing — that needs npm >= 11.5.1. Without it the |
203 | | - # publish PUT goes out unauthenticated and npm masks it as a 404. Upgrade |
204 | | - # so the configured trusted publisher actually authenticates the publish. |
205 | | - - name: Upgrade npm for OIDC trusted publishing |
206 | | - run: npm install -g npm@latest |
207 | | - |
208 | | - - name: Install dependencies |
209 | | - working-directory: crates/hm-dsl-engine/harmont-ts |
210 | | - run: npm ci |
211 | | - |
212 | | - - name: Build |
213 | | - working-directory: crates/hm-dsl-engine/harmont-ts |
214 | | - run: npm run build |
215 | | - |
216 | | - - name: Set version from tag |
217 | | - working-directory: crates/hm-dsl-engine/harmont-ts |
218 | | - run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version |
219 | | - |
220 | | - - name: Publish |
221 | | - working-directory: crates/hm-dsl-engine/harmont-ts |
222 | | - run: | |
223 | | - VERSION="${GITHUB_REF_NAME#v}" |
224 | | - if npm view @harmont/hm@"$VERSION" version 2>/dev/null; then |
225 | | - echo "@harmont/hm@$VERSION already published, skipping" |
226 | | - else |
227 | | - npm publish --access public --provenance |
228 | | - fi |
229 | | -
|
230 | 180 | pypi: |
231 | 181 | name: Publish to PyPI |
232 | 182 | runs-on: ubuntu-latest |
@@ -303,16 +253,6 @@ jobs: |
303 | 253 | if: matrix.musl |
304 | 254 | run: sudo apt-get update && sudo apt-get install -y musl-tools |
305 | 255 |
|
306 | | - - uses: actions/setup-node@v4 |
307 | | - with: |
308 | | - node-version: "20" |
309 | | - cache: npm |
310 | | - cache-dependency-path: crates/hm-dsl-engine/harmont-ts/package-lock.json |
311 | | - |
312 | | - - name: Install esbuild |
313 | | - working-directory: crates/hm-dsl-engine/harmont-ts |
314 | | - run: npm ci |
315 | | - |
316 | 256 | - name: Set version from tag |
317 | 257 | run: | |
318 | 258 | VERSION="${GITHUB_REF_NAME#v}" |
|
0 commit comments