Skip to content

Commit

Permalink
feat(semantic-release): add semantic release support to device manager
Browse files Browse the repository at this point in the history
  • Loading branch information
rolljee authored and sebtiz13 committed Aug 14, 2023
1 parent 10de8b4 commit 99b1683
Show file tree
Hide file tree
Showing 13 changed files with 13,112 additions and 5,059 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
3 changes: 3 additions & 0 deletions .cz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "./node_modules/cz-conventional-changelog"
}
23 changes: 0 additions & 23 deletions .github/workflows/pull_request.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,3 @@ jobs:
run: npm ci
- name: Run tests
run: npm run test:functional

# doc-dead-links:
# name: Check dead-links
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Extract references from context
# shell: bash
# id: extract-refs
# run: |
# echo "::set-output name=version::$(git describe --abbrev=0 --tags | cut -d. -f 1)"
# echo "::set-output name=repo::$(echo $GITHUB_REPOSITORY | cut -d/ -f 2)"
# echo "::set-output name=fw-branch::$(if [ $BASE_BRANCH == master ]; then echo master; else echo develop; fi)"
# - uses: convictional/trigger-workflow-and-wait@v1.3.0
# with:
# owner: kuzzleio
# repo: documentation
# github_token: ${{ secrets.ACCESS_TOKEN_CI }}
# workflow_file_name: dead_links.workflow.yml
# ref: ${{ steps.extract-refs.outputs.fw-branch }}
# inputs: '{"repo_name": "${{ steps.extract-refs.outputs.repo }}", "branch": "${{ github.head_ref }}", "version": "${{ steps.extract-refs.outputs.version }}"}'
88 changes: 88 additions & 0 deletions .github/workflows/push_branches.workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Push checks

on:
push:
branches:
- master
- beta

jobs:
release-device-manager:
name: Release process
runs-on: ubuntu-20.04
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEMANTIC_RELEASE_NPM_PUBLISH: "true"
SEMANTIC_RELEASE_SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}
run: npx semantic-release

release-types:
name: Release process
runs-on: ubuntu-20.04
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"

- name: Go to types directory
run: cd types

- name: Install dependencies
run: npm ci

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEMANTIC_RELEASE_NPM_PUBLISH: "true"
SEMANTIC_RELEASE_SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}
run: npx semantic-release

documentation_deploy:
needs: [release]
name: Documentation - Deploy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}

- uses: convictional/trigger-workflow-and-wait@v1.6.3
with:
owner: kuzzleio
repo: documentation
github_token: ${{ secrets.ACCESS_TOKEN_CI }}
workflow_file_name: child_repo.workflow.yml
ref: ${{ github.ref_name == 'master' && 'master' || 'develop' }}
client_payload: '{"repo_name":"kuzzle-plugin-device-manager","branch":"${{ github.ref_name }}","version":"1"}'
108 changes: 0 additions & 108 deletions .github/workflows/push_dev.workflow.yml

This file was deleted.

120 changes: 0 additions & 120 deletions .github/workflows/push_master.workflow.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": ["semantic-release-config-kuzzle"],
"branches": [
"master",
{ "name": "beta", "prerelease": true }
]
}
7 changes: 0 additions & 7 deletions doc/2/framework/index.md

This file was deleted.

9 changes: 0 additions & 9 deletions doc/2/framework/typedoc/index.md

This file was deleted.

0 comments on commit 99b1683

Please sign in to comment.