Skip to content
Merged
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/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
branches:
- main
- 'release/*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
30 changes: 11 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@ env:

on:
workflow_dispatch:
pull_request_target:
types:
- closed
branches:
- 'main'
paths:
- "src/**"
- "package-lock.json"
- "package.json"
- "tsconfig.json"
- ".github/workflows/release.yml"
inputs:
version_type:
description: 'Type of version bump'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major

jobs:
release:
runs-on: ubuntu-latest
environment: staging
if: github.repository_owner == 'trustification' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/' )
name: Release the project
steps:
- name: Checkout sources
Expand Down Expand Up @@ -65,15 +63,9 @@ jobs:
echo "oldest-tag=$(git for-each-ref --sort=creatordate --format '%(refname:lstrip=2)' refs/tags | grep ${{ steps.last-release.outputs.base-tag }} | head -n 1)" >> "$GITHUB_OUTPUT"

- name: determine semver component to bump
env:
BUMP_PART: ${{ contains(github.event.pull_request.title,'major') && 'major' || 'check-minor' }}
id: bump-decision
run: |
if [[ $BUMP_PART == 'check-minor' ]]; then
echo "bump-part=${{ contains(github.event.pull_request.title,'minor') && 'minor' || 'patch' }}" >> "$GITHUB_OUTPUT"
else
echo "bump-part=major" >> "$GITHUB_OUTPUT"
fi
echo "bump-part=${{ github.event.inputs.version_type }}" >> "$GITHUB_OUTPUT"

- name: Update package with new version
id: bump
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

branches:
- main
- 'release/*'

paths:
- "src/**"
Expand Down
Loading