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
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 6 * * 1'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
cache: maven
- run: mvn verify
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
cache: maven
- name: Get version from pom.xml
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "VERSION=v$VERSION" >> $GITHUB_ENV
- name: Check tag does not exist
run: |
git fetch --tags
if git rev-parse "$VERSION" >/dev/null 2>&1; then
echo "Tag $VERSION already exists"; exit 1;
fi
- name: Check release does not exist
run: |
if gh release view "$VERSION" >/dev/null 2>&1; then
echo "Release $VERSION already exists"; exit 1;
fi
env:
GH_TOKEN: ${{ github.token }}
- run: mvn package
- name: Create tag and release
run: |
git tag "$VERSION"
git push origin "$VERSION"
gh release create "$VERSION" \
--title "$VERSION" \
--generate-notes \
./target/NIOFileServer-*.jar
env:
GH_TOKEN: ${{ github.token }}
Loading