-
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
Showing
3 changed files
with
131 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,25 @@ | ||
name: CI/CD | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 8 | ||
distribution: temurin | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build |
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,56 @@ | ||
name: Prerelease | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Get next Version | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@d745f2e74aaf1ee82e747b181f7a0967978abee0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
release_branches : .* | ||
dry_run: true | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 8 | ||
distribution: temurin | ||
|
||
- name: Build jar with Gradle | ||
run: ./gradlew -Pversion='${{ steps.tag_version.outputs.new_version }}-SNAPSHOT' jar | ||
|
||
- name: Publish to GitHub Maven with Gradle | ||
run: ./gradlew -Pversion='${{ steps.tag_version.outputs.new_version }}-SNAPSHOT' publishInterlisCustomFunctionsPublicationToGitHubPackagesRepository | ||
env: | ||
ORG_GRADLE_PROJECT_GITHUB_ACTOR: ${{ github.actor }} | ||
ORG_GRADLE_PROJECT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
|
||
- uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e | ||
with: | ||
artifacts: "build/libs/*.jar" | ||
allowUpdates: true | ||
name: ${{ steps.tag_version.outputs.new_tag }}-SNAPSHOT | ||
tag: ${{ steps.tag_version.outputs.new_tag }}-SNAPSHOT-${{ github.run_id }} | ||
commit: ${{ github.sha }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
prerelease: true | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@d745f2e74aaf1ee82e747b181f7a0967978abee0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
release_branches: .* | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 8 | ||
distribution: temurin | ||
|
||
- name: Build jar with Gradle | ||
run: ./gradlew -Pversion='${{ steps.tag_version.outputs.new_version }}' jar | ||
|
||
- name: Publish to GitHub Maven with Gradle | ||
run: ./gradlew -Pversion='${{ steps.tag_version.outputs.new_version }}' publishInterlisCustomFunctionsPublicationToGitHubPackagesRepository | ||
env: | ||
ORG_GRADLE_PROJECT_GITHUB_ACTOR: ${{ github.actor }} | ||
ORG_GRADLE_PROJECT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
|
||
- uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e | ||
with: | ||
artifacts: "build/libs/*.jar" | ||
makeLatest: true | ||
name: ${{ steps.tag_version.outputs.new_tag }} | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |