Skip to content

Commit

Permalink
DO NOT MERGE: publish package on NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Aug 6, 2024
1 parent df335ef commit 4d79643
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -17,6 +11,7 @@ permissions:
jobs:
lint:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -71,3 +66,25 @@ jobs:
with:
name: build-standalone
path: dist/netzgrafik-frontend/

publish:
runs-on: ubuntu-latest
needs: build-standalone
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-standalone
path: dist/netzgrafik-frontend/
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
- run: npm version --no-git-tag-version "0.0.0-snapshot.$GITHUB_SHA"
- run: npm pkg delete dependencies optionalDependencies devDependencies
- run: npm publish --provenance --access public --tag snapshot
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"local-test": "ng test --watch --code-coverage",
"extract-i18n": "ng extract-i18n"
},
"name": "netzgrafik-frontend",
"name": "@osrd-project/netzgrafik-frontend",
"version": "2.7.2",
"repository": {
"type": "git",
"url": "https://github.com/SchweizerischeBundesbahnen/netzgrafik-editor-frontend.git"
"url": "https://github.com/osrd-project/netzgrafik-editor-frontend.git"
},
"files": [
"dist/*"
Expand Down

0 comments on commit 4d79643

Please sign in to comment.