Skip to content

Commit

Permalink
👷 add publish workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Vinicius Reis <[email protected]>
  • Loading branch information
Vinicius Reis committed Aug 11, 2022
1 parent d664645 commit 8bf7c54
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 59 deletions.
60 changes: 1 addition & 59 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
46 changes: 46 additions & 0 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}

0 comments on commit 8bf7c54

Please sign in to comment.