From 6b68b0c6ef17c90af73de1c4e9c3ff6c357da227 Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Sun, 14 Aug 2022 15:27:00 +0200 Subject: [PATCH] publish on release --- .github/workflows/npmpublish.yml | 34 +++++++++++++++ .github/workflows/onpush.yml | 2 +- archive/gh-disabled-workflows/npmpublish.yml | 45 -------------------- package-lock.json | 17 ++++---- package.json | 4 +- 5 files changed, 45 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/npmpublish.yml delete mode 100644 archive/gh-disabled-workflows/npmpublish.yml diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml new file mode 100644 index 00000000..a7e9860e --- /dev/null +++ b/.github/workflows/npmpublish.yml @@ -0,0 +1,34 @@ +name: manage npm release + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + - run: | + npm ci + npm run build --workspace=packages/svgcanvas + npm run lint + npm run test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + diff --git a/.github/workflows/onpush.yml b/.github/workflows/onpush.yml index 1fb821ac..e8e9c923 100644 --- a/.github/workflows/onpush.yml +++ b/.github/workflows/onpush.yml @@ -1,4 +1,4 @@ -name: Node CI +name: check each push on: [push] diff --git a/archive/gh-disabled-workflows/npmpublish.yml b/archive/gh-disabled-workflows/npmpublish.yml deleted file mode 100644 index 5a69d2c8..00000000 --- a/archive/gh-disabled-workflows/npmpublish.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - - run: npm ci - - run: npm test - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - scope: '@brettz9' - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package-lock.json b/package-lock.json index 707fd51e..7db49827 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "packages/svgcanvas" ], "dependencies": { - "@svgedit/svgcanvas": "7.1.5", + "@svgedit/svgcanvas": "7.1.6", "browser-fs-access": "0.31.0", "core-js": "3.24.1", "elix": "15.0.1", @@ -55,7 +55,7 @@ "remark-cli": "11.0.0", "remark-lint-ordered-list-marker-value": "3.1.1", "rimraf": "3.0.2", - "rollup": "2.77.2", + "rollup": "2.78.0", "rollup-plugin-copy": "3.4.0", "rollup-plugin-filesize": "9.1.2", "rollup-plugin-html": "0.2.1", @@ -15576,11 +15576,10 @@ } }, "node_modules/rollup": { - "version": "2.77.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.2.tgz", - "integrity": "sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==", + "version": "2.78.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.0.tgz", + "integrity": "sha512-4+YfbQC9QEVvKTanHhIAFVUFSRsezvQF8vFOJwtGfb9Bb+r014S+qryr9PSmw8x6sMnPkmFBGAvIFVQxvJxjtg==", "dev": true, - "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, @@ -30086,9 +30085,9 @@ } }, "rollup": { - "version": "2.77.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.2.tgz", - "integrity": "sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==", + "version": "2.78.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.0.tgz", + "integrity": "sha512-4+YfbQC9QEVvKTanHhIAFVUFSRsezvQF8vFOJwtGfb9Bb+r014S+qryr9PSmw8x6sMnPkmFBGAvIFVQxvJxjtg==", "dev": true, "requires": { "fsevents": "~2.3.2" diff --git a/package.json b/package.json index 1530f9a5..97328a5b 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ ] }, "dependencies": { - "@svgedit/svgcanvas": "7.1.5", + "@svgedit/svgcanvas": "7.1.6", "browser-fs-access": "0.31.0", "core-js": "3.24.1", "elix": "15.0.1", @@ -124,7 +124,7 @@ "remark-cli": "11.0.0", "remark-lint-ordered-list-marker-value": "3.1.1", "rimraf": "3.0.2", - "rollup": "2.77.2", + "rollup": "2.78.0", "rollup-plugin-copy": "3.4.0", "rollup-plugin-filesize": "9.1.2", "rollup-plugin-html": "0.2.1",