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
8 changes: 4 additions & 4 deletions .github/workflows/package-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: package-macOS

on:
workflow_dispatch:
push:
branches: [ master, dev-master ]
pull_request:
branches: [ master, dev-master ]
workflow_run:
workflows: [ version-bump ]
types: [ completed ]

# Minimalne uprawnienia
permissions:
Expand All @@ -18,6 +17,7 @@ concurrency:

jobs:
build:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
os: [ macos-latest ] # arm64 runner (Apple Silicon)
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: version-bump

on:
pull_request:
branches: [ master ]
types: [ closed ]

permissions:
contents: write

jobs:
bump-version:
runs-on: ubuntu-latest

steps:
- name: Check if PR was merged
if: github.event.pull_request.merged != true
run: |
echo "PR closed without merging, skipping."
exit 1

- uses: actions/checkout@v4
with:
ref: master

- uses: actions/setup-node@v5
with:
node-version: '20'

- name: Bump patch version
run: |
cd app
npm version patch --no-git-tag-version
NEW_VERSION=$(node -p "require('./package.json').version")
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV

- name: Commit and push version bump
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add app/package.json
git commit -m "chore: bump version to ${{ env.NEW_VERSION }}"
git push