forked from zentity-io/zentity
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
2 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
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,34 @@ | ||
name: Commit | ||
on: [push] | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
elasticsearch: | ||
- 7.10.1 | ||
- 7.10.0 | ||
- 7.9.3 | ||
- 7.9.2 | ||
- 7.9.3 | ||
- 7.8.1 | ||
- 7.8.0 | ||
- 7.7.1 | ||
- 7.7.0 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build and test with Maven | ||
env: | ||
ELASTICSEARCH_VERSION: ${{ matrix.elasticsearch }} | ||
run: mvn --batch-mode clean install "-Delasticsearch.version=${{ matrix.elasticsearch }}" --file pom.xml |
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,79 @@ | ||
name: Create Release | ||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
- '*.*.*-rc*' | ||
jobs: | ||
create_release: | ||
name: Create Release | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
# Generate the release changelog from commits since the last release | ||
- name: Build Changelog | ||
id: build_changelog | ||
uses: mikepenz/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Create and upload assets to a release | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: ${{ contains('rc', github.ref) }} | ||
body: ${{ steps.build_changelog.outputs.changelog }} | ||
build_and_upload_artifacts: | ||
name: Build and Upload Artifacts | ||
needs: create_release | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
elasticsearch: | ||
- 7.10.1 | ||
- 7.10.0 | ||
- 7.9.3 | ||
- 7.9.2 | ||
- 7.9.3 | ||
- 7.8.1 | ||
- 7.8.0 | ||
- 7.7.1 | ||
- 7.7.0 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build with Maven | ||
env: | ||
ELASTICSEARCH_VERSION: ${{ matrix.elasticsearch }} | ||
run: | | ||
mvn --batch-mode clean package \ | ||
-Delasticsearch.version=${{ matrix.elasticsearch }} \ | ||
-Dzentity.version=${{ github.ref }} \ | ||
--file pom.xml | ||
- name: Upload Release Asset | ||
id: upload_release_asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# Pull from the create_release job above, referencing it's ID to get its outputs object, which include a `upload_url`. | ||
# see: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: ./target/releases//zentity-${{ github.ref }}-elasticsearch-${{ matrix.elasticsearch }}.zip | ||
asset_name: zentity-${{ github.ref }}-elasticsearch-${{ matrix.elasticsearch }}.zip | ||
asset_content_type: application/zip |