-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d35955
commit e04be40
Showing
3 changed files
with
107 additions
and
39 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Maven CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{steps.build.outputs.version}} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
|
||
- name: Build with Maven | ||
run: mvn compile | ||
|
||
- name: Extract Maven project version | ||
id: project | ||
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Test with Maven | ||
run: mvn test --batch-mode --fail-at-end | ||
|
||
- name: Publish Test Report | ||
if: success() || failure() | ||
uses: scacap/action-surefire-report@v1 | ||
|
||
- name: Package with maven | ||
run: mvn package | ||
|
||
- name: Upload files to a GitHub release | ||
uses: svenstaro/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/components/packages/kafka-connect-vespa-${{ steps.build.outputs.version }}.zip | ||
tag: ${{ github.event.release.tag_name }} | ||
|
||
- name: Archive file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: vinted-kafka-connect-vespa-${{ steps.build.outputs.version }} | ||
path: target/components/packages/kafka-connect-vespa-${{ steps.build.outputs.version }}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{steps.build.outputs.version}} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
|
||
- name: Build with Maven | ||
id: build | ||
run: | | ||
mvn -B -ntp versions:set -DnewVersion=${{ github.event.release.tag_name }} | ||
mvn -B -V -ntp clean package -DskipTests | ||
- name: Extract Maven project version | ||
id: project | ||
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Upload files to a GitHub release | ||
uses: svenstaro/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/components/packages/kafka-connect-vespa-${{ steps.build.outputs.version }}.zip | ||
tag: ${{ github.event.release.tag_name }} | ||
|
||
- name: Archive file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: vinted-kafka-connect-vespa-${{ steps.build.outputs.version }} | ||
path: target/components/packages/kafka-connect-vespa-${{ steps.build.outputs.version }}.zip |