Skip to content

Commit

Permalink
ci: remove use of set ouput that id deprecated.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfaller committed Jan 20, 2024
1 parent 190aed8 commit ba58e71
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build-test-gumtree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
submodules: recursive
- name: retrieve gumtree version
id: version
run: echo "::set-output name=version::$(cat build.gradle | grep "projectsVersion =" | cut -f 2 -d "'")"
run: echo "VERSION=$(cat build.gradle | grep "projectsVersion =" | cut -f 2 -d "'")" >> $GITHUB_OUTPUT
shell: bash
- name: build gumtree
run: ./gradlew -PtestNative build :benchmark:runOnDefects4J :benchmark:ciDefects4JAnalysis
Expand All @@ -48,21 +48,26 @@ jobs:
name: test-report
path: build/reports/tests
- name: upload snapshot package
if: "github.event_name == 'schedule' && contains(steps.version.outputs.version, 'SNAPSHOT')"
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
VERSION: ${{ steps.version.outputs.VERSION }}
if: "github.event_name == 'schedule' && contains(VERSION, 'SNAPSHOT')"
run: ./gradlew publish

- name: upload release package
if: "github.event_name == 'push' && !contains(steps.version.outputs.version, 'SNAPSHOT') && endsWith(github.ref, steps.version.outputs.version)"
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
ORG_GRADLE_PROJECT_gumtreeKey: ${{ secrets.GUMTREE_KEY }}
ORG_GRADLE_PROJECT_gumtreeKeyPassphrase: ${{ secrets.GUMTREE_KEY_PASSPHRASE }}
VERSION: ${{ steps.version.outputs.VERSION }}
if: "github.event_name == 'push' && !contains(VERSION, 'SNAPSHOT') && endsWith(github.ref, steps.version.outputs.version)"
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
- name: create github release
if: "github.event_name == 'push' && !contains(steps.version.outputs.version, 'SNAPSHOT') && endsWith(github.ref, steps.version.outputs.version)"
env:
VERSION: ${{ steps.version.outputs.VERSION }}
if: "github.event_name == 'push' && !contains(VERSION, 'SNAPSHOT') && endsWith(github.ref, steps.version.outputs.version)"
uses: ncipollo/release-action@v1
with:
artifacts: "dist/build/distributions/gumtree*.zip"
Expand Down

0 comments on commit ba58e71

Please sign in to comment.