Skip to content

Commit

Permalink
ci: store artifact name
Browse files Browse the repository at this point in the history
  • Loading branch information
austince committed Jan 12, 2021
1 parent c491610 commit bb0ba01
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
name: Build and Upload Artifacts
needs: create_release
runs-on: ubuntu-20.04
env:
ZENTITY_VERSION: ${{ needs.create_release.outputs.release_tag }}
strategy:
matrix:
elasticsearch:
Expand Down Expand Up @@ -66,12 +68,16 @@ jobs:
- name: Build with Maven
env:
ELASTICSEARCH_VERSION: ${{ matrix.elasticsearch }}
ZENTITY_VERSION: ${{ needs.create_release.outputs.release_tag }}
run: |
mvn --batch-mode clean package \
-Delasticsearch.version=${ELASTICSEARCH_VERSION} \
-Dzentity.version=${ZENTITY_VERSION} \
--file pom.xml
- name: Set Artifact Name
id: set_artifact_name
env:
ELASTICSEARCH_VERSION: ${{ matrix.elasticsearch }}
run: echo ::set-output name=name::zentity-${ZENTITY_VERSION}-elasticsearch-${ELASTICSEARCH_VERSION}.zip
- name: Upload Release Asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
Expand All @@ -83,6 +89,6 @@ jobs:
# 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-${ZENTITY_VERSION}-elasticsearch-${ELASTICSEARCH_VERSION}.zip
asset_name: zentity-${ZENTITY_VERSION}-elasticsearch-${ELASTICSEARCH_VERSION}.zip
asset_path: ./target/releases/${{ steps.set_artifact_name.outputs.name }}
asset_name: ${{ steps.set_artifact_name.outputs.name }}
asset_content_type: application/zip

0 comments on commit bb0ba01

Please sign in to comment.