-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from nextcloud/chore/add-basic-CI
chore: Add some basic CI workflows
- Loading branch information
Showing
6 changed files
with
173 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SPDX-FileCopyrightText: Nextcloud contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: saturday | ||
time: "03:00" | ||
timezone: Europe/Paris | ||
open-pull-requests-limit: 10 | ||
versioning-strategy: increase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# This workflow is provided via the organization template repository | ||
# | ||
# https://github.com/nextcloud/.github | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
# | ||
# SPDX-FileCopyrightText: Nextcloud contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
name: Dependabot | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
- master | ||
- stable* | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: dependabot-approve-merge-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
auto-approve-merge: | ||
if: github.actor == 'dependabot[bot]' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# for hmarr/auto-approve-action to approve PRs | ||
pull-requests: write | ||
|
||
steps: | ||
# Github actions bot approve | ||
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Nextcloud bot approve and merge request | ||
- uses: ahmadnassri/action-dependabot-auto-merge@45fc124d949b19b6b8bf6645b6c9d55f4f9ac61a # v2 | ||
with: | ||
target: minor | ||
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This workflow is provided via the organization template repository | ||
# | ||
# https://github.com/nextcloud/.github | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
# | ||
# SPDX-FileCopyrightText: Nextcloud contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
name: Block fixup and squash commits | ||
|
||
on: | ||
pull_request: | ||
types: [opened, ready_for_review, reopened, synchronize] | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: fixup-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
commit-message-check: | ||
if: github.event.pull_request.draft == false | ||
|
||
permissions: | ||
pull-requests: write | ||
name: Block fixup and squash commits | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Run check | ||
uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# This workflow is provided via the organization template repository | ||
# | ||
# https://github.com/nextcloud/.github | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
# | ||
# SPDX-FileCopyrightText: Nextcloud contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
name: Build and publish to npm | ||
steps: | ||
- name: Check actor permission level | ||
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1 | ||
with: | ||
require: admin | ||
|
||
- name: Checkout | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
|
||
- name: Read package.json node and npm engines version | ||
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 | ||
id: versions | ||
with: | ||
fallbackNode: '^20' | ||
fallbackNpm: '^9' | ||
|
||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 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 --if-present | ||
- name: Publish | ||
run: | | ||
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Setup Github Package Registry | ||
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3 | ||
with: | ||
registry-url: 'https://npm.pkg.github.com' | ||
|
||
- name: Publish package on GPR | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"target": "ES2022", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"outDir": "dist", | ||
"declaration": true | ||
}, | ||
"include": [ | ||
"lib/**/*.ts" | ||
] | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"target": "ES2022", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"outDir": "dist", | ||
"declaration": true | ||
}, | ||
"include": [ | ||
"lib/**/*.ts" | ||
] | ||
} |