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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @manni497
2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

101 changes: 0 additions & 101 deletions .github/dependabot.yml

This file was deleted.

86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

on:
workflow_dispatch:
pull_request:
branches: [main, develop, master]
types: [opened, synchronize, ready_for_review]

# cancel running actions for current PR if new commits were pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
depandabot-modify-changelog:
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- run: |
insertText="### dependabot: \\\#${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}"

# check if file doesn't contain the text already
if ! grep -q "$insertText" CHANGELOG.md; then
echo "Changelog entry not found, adding it"
sed -i "/## \[Unreleased\]/a \
$insertText" CHANGELOG.md
else
echo "Changelog entry already exists, skipping"
exit 0
fi

- name: initialize mandatory git config
run: |
git config user.name "GitHub Changelog Bot"
git config user.email changelog-bot@neolution.ch

- run: npx prettier --write CHANGELOG.md

- name: commit and push
run: |
git add CHANGELOG.md
git commit -m "Add changelog entry for ${{ github.event.pull_request.title }}"
git push

check-changelog:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45

- name: Check if changelog was touched
run: |
changelogFound=$(echo ${{ steps.changed-files.outputs.all_changed_files }} | grep -ow "CHANGELOG.md" | wc -w)
if [ $changelogFound -eq 0 ]; then
echo '### :boom: Please update the changelog accordingly (https://keepachangelog.com)' >> $GITHUB_STEP_SUMMARY
exit 1
fi

build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x, 22.x, 24.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- run: rm -rf node_modules && yarn install --frozen-lockfile
- run: npm run lint
- run: npm run build --if-present
- run: npm run test:ci
30 changes: 0 additions & 30 deletions .github/workflows/coverage.yml

This file was deleted.

77 changes: 77 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Create Release

on:
workflow_dispatch:
inputs:
version_type:
type: choice
description: Semantic Version Type
options:
- major
- minor
- patch
- no-version-update

pre_release:
type: choice
description: Pre Release?
options:
- stable
- alpha
- beta
- rc

jobs:
release-it:
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.RELEASE_BOT_APP_ID }}
private_key: ${{ secrets.RELEASE_BOT_APP_PRIVATE_KEY }}

- name: checkout
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
# we need everything so release-it can compare the current version with the latest tag
fetch-depth: 0

- name: initialize mandatory git config
run: |
git config user.name "GitHub Release Bot"
git config user.email release-bot@neolution.ch

- name: install yarn packages
run: |
yarn --frozen-lockfile

- name: set NPM Token
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_NEOLUTION }}

- name: build
run: yarn build

- name: run release-it
run: |
params=()

if [[ ${{ github.event.inputs.version_type }} != "no-version-update" ]]; then
params+=(${{ github.event.inputs.version_type }})
fi

if [[ ${{ github.event.inputs.pre_release }} != "stable" ]]; then
params+=(--preRelease=${{ github.event.inputs.pre_release }})
params+=(--plugins.@release-it/keep-a-changelog.keepUnreleased)
params+=(--no-plugins.@release-it/keep-a-changelog.strictLatest)
fi

params+=(--ci)

yarn release-it "${params[@]}"
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
18 changes: 0 additions & 18 deletions .github/workflows/docs.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PKG PR New
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, ready_for_review]
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- run: rm -rf node_modules && yarn --frozen-lockfile

# append the git commit to the package.json version.
# We do this because some cache mechanisms (like nextjs) don't work well with the same version and ignore the changes
# until you manually delete the caches
- run: jq '.version = .version + "-" + env.GITHUB_SHA' package.json > package.json.tmp && mv package.json.tmp package.json

- run: yarn build

- run: npx pkg-pr-new publish
Loading