Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @StuartApp/sysadmins
@StuartApp/sre
27 changes: 27 additions & 0 deletions .github/common-dependencies/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: common-dependencies
description: Set up common workflow dependencies
inputs:
NODEJS_VERSION:
description: Required Workflow Node JS version
required: false
PYTHON_VERSION:
description: Required Workflow Python version
required: false
GO_VERSION:
description: Required Workflow GO version
required: false
runs:
using: composite
steps:
- if: ${{ inputs.NODEJS_VERSION != '' }}
name: Setup NodeJS ${{ inputs.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.NODEJS_VERSION }}

- if: ${{ inputs.PYTHON_VERSION != '' }}
name: Setup Python ${{ inputs.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.PYTHON_VERSION }}
38 changes: 38 additions & 0 deletions .github/workflows/on-pr-title.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Validate PR title

on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- edited
- reopened
- synchronize

jobs:
pr-title:
name: Validate PR title
runs-on: self-hosted
steps:
- name: Retrieve GitHub event payload
run: echo $GH_EVENT_PAYLOAD
env:
GH_EVENT_PAYLOAD: ${{ toJSON(github.event) }}
- uses: amannn/action-semantic-pull-request@v5.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
docs
ci
chore
requireScope: false
subjectPattern: ^([A-Z]{2,}[0-9]{0,1}-[0-9]+).*$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
starts with its associated Jira issue id.
wip: true
validateSingleCommit: false
28 changes: 28 additions & 0 deletions .github/workflows/on-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Check Pull Request

on:
pull_request:
branches:
- master
jobs:
release-test:
name: release-test
runs-on:
- self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js with GitHub Package Registry
uses: actions/setup-node@v3
with:
node-version: 20
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
with:
branch: master
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/on-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Semantic Release

on: # yamllint disable-line rule:truthy
push:
branches:
- master
env:
NODEJS_VERSION: 16

jobs:
semantic-release:
name: Create and Publish Semantic Release
runs-on: self-hosted
outputs:
publish: ${{ steps.semantic-release.outputs.new_release_published }}
version: ${{ steps.semantic-release.outputs.new_release_version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: ./.github/common-dependencies
with:
NODEJS_VERSION: ${{ env.NODEJS_VERSION }}

- name: Semantic Release
id: semantic-release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19.0.5
extra_plugins: |
@semantic-release/git@10.0.1
@semantic-release/changelog@6.0.1
conventional-changelog-conventionalcommits@4.6.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_COMMITTER_NAME: ${{ vars.GH_BOT_NAME }}
GIT_AUTHOR_NAME: ${{ vars.GH_BOT_NAME }}
GIT_COMMITTER_EMAIL: ${{ vars.GH_BOT_EMAIL }}
GIT_AUTHOR_EMAIL: ${{ vars.GH_BOT_EMAIL }}

- name: Print new version
run: echo ${{ steps.semantic-release.outputs.new_release_version }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.egg-info/
build/
dist/
.vscode/
.venv/
25 changes: 25 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
branches:
- master
ci: false
plugins:
- - "@semantic-release/commit-analyzer"
- preset: conventionalcommits
- - "@semantic-release/release-notes-generator"
- preset: conventionalcommits
- - "@semantic-release/github"
- successComment: >-
'This PR is included in version ${nextRelease.version} :rocket:'
labels: false
releasedLabels: false
- - "@semantic-release/changelog"
- changelogFile: CHANGELOG.md
changelogTitle: |-
# [CHANGELOG](https://keepachangelog.com/en/1.0.0/)
- - "@semantic-release/git"
- assets:
- CHANGELOG.md
message: |-
chore(release): version ${nextRelease.version} [skip ci]

${nextRelease.notes}
Empty file added CHANGELOG.md
Empty file.