diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 93dd55b6..65823691 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -54,3 +54,20 @@ jobs: with: name: build path: dist/netzgrafik-frontend/ + + build-standalone: + runs-on: ubuntu-latest + needs: lint + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + - run: npm clean-install + - run: npm run build:standalone + - name: Store build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-standalone + path: dist/netzgrafik-frontend/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba31e60f..46eb94ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,3 +38,22 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + release-npm-package: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + registry-url: 'https://registry.npmjs.org' + - run: npm clean-install + - run: npm run build:standalone + - run: npm pkg delete dependencies optionalDependencies devDependencies + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 293b5a06..a5371351 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,10 @@ }, "name": "netzgrafik-frontend", "version": "2.5.0", + "repository": { + "type": "git", + "url": "https://github.com/SchweizerischeBundesbahnen/netzgrafik-editor-frontend.git" + }, "files": [ "dist/*" ],