Skip to content

Commit 9be5fca

Browse files
committed
ci: add GitHub Actions workflows for CI and release management
1 parent b530ed1 commit 9be5fca

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v4
1616

17+
- name: Cache apt packages
18+
uses: actions/cache@v4
19+
with:
20+
path: /var/cache/apt/archives
21+
key: ${{ runner.os }}-apt-shellcheck-${{ hashFiles('**/lockfiles') }}
22+
restore-keys: |
23+
${{ runner.os }}-apt-shellcheck-
24+
1725
- name: Install ShellCheck
1826
run: |
1927
sudo apt-get update

.github/workflows/release.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@ permissions:
66
pull-requests: write # For creating releases
77

88
on:
9-
push:
10-
branches:
11-
- main # Or your release branch
9+
workflow_dispatch:
10+
inputs:
11+
version_bump_type:
12+
description: 'The type of version bump (major, minor, or patch)'
13+
required: true
14+
default: 'patch'
15+
type: 'choice'
16+
options:
17+
- patch
18+
- minor
19+
- major
1220

1321
jobs:
1422
calculate-version:
@@ -33,6 +41,8 @@ jobs:
3341
run: |
3442
chmod +x .github/scripts/bump-version.sh
3543
./.github/scripts/bump-version.sh
44+
env:
45+
VERSION_BUMP_TYPE: ${{ github.event.inputs.version_bump_type }}
3646
# In a real scenario, you might pass VERSION_BUMP_TYPE based on commit analysis
3747
# env:
3848
# VERSION_BUMP_TYPE: 'patch' # or 'minor', 'major'

0 commit comments

Comments
 (0)