Update gradle-publish.yml #86
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
name: Latest semi stable SBA | |
on: | |
push: | |
branches: [ release ] | |
concurrency: sba_v1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: release | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'microsoft' | |
java-version: 17 | |
cache: 'gradle' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Read value from Properties-file | |
id: read_property | |
uses: Reedyuk/[email protected] | |
with: | |
path: './gradle.properties' | |
property: 'SBA_VERSION' | |
- name: Declare some variables | |
id: vars | |
shell: bash | |
run: | | |
echo "{branch}=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_STATE | |
echo "{sha_short}=$(git rev-parse --short HEAD)" >> $GITHUB_STATE | |
- name: Build with Gradle | |
run: ./gradlew | |
env: | |
OPTIMIZE_FOR_CI_CD: "1" | |
BUILD_NUMBER: ${{ github.run_id }} | |
GITHUB_ACTIONS_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
GITHUB_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}" | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "LICENSE,plugin/build/libs/*.jar" | |
tag: ${{ steps.read_property.outputs.value }} | |
allowUpdates: true | |
prerelease: false | |
# - name: Upload Release Asset | |
# id: upload-release-asset | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
# asset_path: plugin/build/libs/SBA-${{ steps.read_property.outputs.value }}-all.jar | |
# asset_name: SBA-${{ steps.read_property.outputs.value }}-all.jar | |
# asset_content_type: application/java-archive |