Skip to content

Commit 8d640e1

Browse files
MoshPeclaude
andcommitted
ci: add CI, snapshot, and Dependabot workflows
- ci.yml: build and test on every push to main and every PR - snapshot.yml: publish a -SNAPSHOT to GitHub Packages on every merge to main (no GPG signing, no Central upload) - dependabot.yml: weekly PRs for Maven and GitHub Actions updates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 370dbee commit 8d640e1

3 files changed

Lines changed: 93 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
open-pull-requests-limit: 5
9+
labels:
10+
- dependencies
11+
12+
- package-ecosystem: github-actions
13+
directory: /
14+
schedule:
15+
interval: weekly
16+
day: monday
17+
open-pull-requests-limit: 5
18+
labels:
19+
- dependencies

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Java 25
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '25'
21+
distribution: 'temurin'
22+
23+
- name: Build and test
24+
run: |
25+
mvn -pl streamfence-core \
26+
--no-transfer-progress \
27+
clean verify \
28+
-Dgpg.skip=true

.github/workflows/snapshot.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Snapshot
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
snapshot:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Java 25
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: '25'
22+
distribution: 'temurin'
23+
server-id: github
24+
server-username: GITHUB_ACTOR
25+
server-password: GITHUB_TOKEN
26+
27+
- name: Set snapshot version
28+
run: |
29+
BASE=$(mvn -pl streamfence-core help:evaluate \
30+
-Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//')
31+
mvn -pl streamfence-core versions:set \
32+
-DnewVersion=${BASE}-SNAPSHOT \
33+
-DgenerateBackupPoms=false
34+
35+
- name: Publish snapshot to GitHub Packages
36+
run: |
37+
mvn -pl streamfence-core \
38+
--no-transfer-progress \
39+
deploy \
40+
-DskipTests \
41+
-Dgpg.skip=true \
42+
-Dcentral.publishing.skip=true \
43+
-DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
44+
env:
45+
GITHUB_ACTOR: ${{ github.actor }}
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)