Skip to content

Commit

Permalink
update Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
EladLeev committed Feb 10, 2024
1 parent 62aa7e5 commit d953ea7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 34 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/draft_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,32 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
test_and_build:
build:
name: Test, Build and Release
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)

- uses: actions/checkout@v4
- uses: eladleev/KeyToField-smt/.github/workflows/test_and_build.yaml@main

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "8"
cache: maven

- name: Maven Set Version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }} -B --file pom.xml

- name: Run the Maven verify phase
run: mvn --batch-mode --update-snapshots verify

- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,21 @@ jobs:
permissions:
contents: write
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)

- uses: actions/checkout@v4
- uses: eladleev/KeyToField-smt/.github/workflows/test_and_build.yaml@main

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "8"
cache: maven

- name: Maven Set Version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }} -B --file pom.xml

- name: Run the Maven verify phase
run: mvn --batch-mode --update-snapshots verify
31 changes: 0 additions & 31 deletions .github/workflows/test_and_build.yaml

This file was deleted.

0 comments on commit d953ea7

Please sign in to comment.