Skip to content

Commit 2fce4c5

Browse files
committed
DO NOT MERGE: publish package on NPM
1 parent f0cea11 commit 2fce4c5

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
name: Continuous Integration
2-
on:
3-
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
2+
on: [push]
93

104
concurrency:
115
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -17,6 +11,7 @@ permissions:
1711
jobs:
1812
lint:
1913
runs-on: ubuntu-latest
14+
continue-on-error: true
2015
steps:
2116
- uses: actions/checkout@v4
2217
- uses: actions/setup-node@v4
@@ -48,9 +43,31 @@ jobs:
4843
node-version-file: '.nvmrc'
4944
cache: 'npm'
5045
- run: npm clean-install
51-
- run: npm run build
46+
- run: npm run build:standalone
5247
- name: Store build artifacts
5348
uses: actions/upload-artifact@v4
5449
with:
5550
name: build
5651
path: dist/netzgrafik-frontend/
52+
53+
publish:
54+
runs-on: ubuntu-latest
55+
needs: build
56+
permissions:
57+
contents: read
58+
id-token: write
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Download build artifacts
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: build
65+
path: dist/netzgrafik-frontend/
66+
- uses: actions/setup-node@v4
67+
with:
68+
registry-url: 'https://registry.npmjs.org'
69+
- run: npm version --no-git-tag-version "0.0.0-snapshot.$GITHUB_SHA"
70+
- run: npm pkg delete dependencies optionalDependencies devDependencies
71+
- run: npm publish --provenance --access public --tag snapshot
72+
env:
73+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
"generate:api": "openapi-generator-cli generate",
1616
"local-test": "ng test --watch --code-coverage"
1717
},
18-
"name": "netzgrafik-frontend",
18+
"name": "@osrd-project/netzgrafik-frontend",
1919
"version": "2.5.0",
20+
"repository": {
21+
"type": "git",
22+
"url": "https://github.com/osrd-project/netzgrafik-editor-frontend.git"
23+
},
2024
"files": [
2125
"dist/*"
2226
],

0 commit comments

Comments
 (0)