From 8bf7c548dd893cf299ace9b90a87939d6622597b Mon Sep 17 00:00:00 2001 From: Vinicius Reis Date: Thu, 11 Aug 2022 11:24:12 -0300 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=91=B7=20add=20publish=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinicius Reis --- .github/dependabot.yml | 60 +------------------------------ .github/workflows/doc-publish.yml | 46 ++++++++++++++++++++++++ .github/workflows/publish.yml | 51 ++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 59 deletions(-) create mode 100644 .github/workflows/doc-publish.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7064486..2ab2d39 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,62 +8,4 @@ updates: time: "03:00" timezone: Europe/Paris open-pull-requests-limit: 10 - ignore: - - dependency-name: typedoc - versions: - - 0.20.16 - - 0.20.19 - - 0.20.21 - - 0.20.24 - - 0.20.25 - - 0.20.28 - - 0.20.29 - - 0.20.30 - - 0.20.32 - - 0.20.34 - - dependency-name: "@babel/core" - versions: - - 7.12.10 - - 7.12.13 - - 7.12.16 - - 7.12.17 - - 7.13.10 - - 7.13.13 - - 7.13.8 - - dependency-name: "@babel/preset-env" - versions: - - 7.12.11 - - 7.12.13 - - 7.12.16 - - 7.12.17 - - 7.13.10 - - 7.13.12 - - 7.13.8 - - 7.13.9 - - dependency-name: "@babel/cli" - versions: - - 7.12.10 - - 7.12.13 - - 7.12.16 - - 7.12.17 - - 7.13.0 - - 7.13.10 - - dependency-name: core-js - versions: - - 3.8.3 - - 3.9.0 - - 3.9.1 - - dependency-name: "@nextcloud/browserslist-config" - versions: - - 2.0.0 - - dependency-name: "@babel/preset-typescript" - versions: - - 7.12.13 - - 7.12.16 - - 7.12.17 - - dependency-name: typescript - versions: - - 4.0.7 - - dependency-name: node-notifier - versions: - - 8.0.1 + versioning-strategy: increase diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml new file mode 100644 index 0000000..b493a60 --- /dev/null +++ b/.github/workflows/doc-publish.yml @@ -0,0 +1,46 @@ +name: Doc Publish + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + + name: Publish doc + steps: + - name: Check actor permission level + uses: skjnldsv/check-actor-permission@v2 + with: + require: admin + + - name: Checkout + uses: actions/checkout@v3 + + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@v1.2 + id: versions + with: + fallbackNode: '^16' + fallbackNpm: '^8' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@v3 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + + - name: Install dependencies & build + run: | + npm ci + npm run build + npm run build:doc + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist/doc \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e69626d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,51 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ”’โ€‹ Check actor permission level + uses: skjnldsv/check-actor-permission@v2 + with: + require: admin + + - name: ๐Ÿ“ฅโ€‹ Checkout + uses: actions/checkout@v3 + + - name: ๐Ÿช„ Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@v1.2 + id: versions + with: + fallbackNode: '^16' + fallbackNpm: '^8' + + - name: ๐Ÿ”งโ€‹ Setup Node (NPM Registry) + uses: actions/setup-node@v3 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + cache: 'npm' + registry-url: 'https://registry.npmjs.org' + + - name: ๐Ÿ“ฆ Install dependencies & build + run: | + npm ci + npm run build + + - name: ๐Ÿ“ฃ Publish package on NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: ๐Ÿ”งโ€‹ Setup Github Registry + uses: actions/setup-node@v3 + with: + registry-url: 'https://npm.pkg.github.com' + + - name: ๐Ÿ“ฃ Publish package on GPR + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 66302fb2f5cc60bcb5db303f60daf35f13e0ed0a Mon Sep 17 00:00:00 2001 From: Vinicius Reis Date: Thu, 11 Aug 2022 11:25:30 -0300 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=96=20bump=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinicius Reis --- CHANGELOG.md | 2 +- README.md | 3 +++ package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 407aaae..7665261 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. -## 2.0.0 - Draft +## 2.0.0 - 2022-08-11 ### Added - Rollup as bundler - ESM bundle diff --git a/README.md b/README.md index a7258ad..e7ecae3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ Nextcloud helpers related to authentication and the current user +[![npm](https://img.shields.io/npm/v/@nextcloud/auth.svg)](https://www.npmjs.com/package/@nextcloud/auth) +[![Documentation](https://img.shields.io/badge/Documentation-online-brightgreen)](https://nextcloud.github.io/nextcloud-auth/index.html) + ## Install ```sh diff --git a/package.json b/package.json index 9465ac6..89ab717 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nextcloud/auth", - "version": "2.0.0-next", + "version": "2.0.0", "description": "Nextcloud helpers related to authentication and the current user", "main": "dist/index.js", "module": "dist/index.esm.js",