Skip to content

Commit

Permalink
ci: extract release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
austince committed Jan 12, 2021
1 parent 7abf2e9 commit b39907a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ jobs:
runs-on: ubuntu-20.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
release_tag: ${{ steps.extract_tag.outputs.tag }}
steps:
# Generate the release changelog from commits since the last release
- name: Build Changelog
id: build_changelog
uses: mikepenz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Extract the tag
# see: https://stackoverflow.com/a/58178121/4705719
- name: Extract Release Tag
id: extract_tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# Create and upload assets to a release
- name: Create Release
id: create_release
Expand Down Expand Up @@ -60,10 +66,11 @@ 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=${{ matrix.elasticsearch }} \
-Dzentity.version=${{ github.ref }} \
-Delasticsearch.version=${ELASTICSEARCH_VERSION} \
-Dzentity.version=${ZENTITY_VERSION} \
--file pom.xml
- name: Upload Release Asset
id: upload_release_asset
Expand Down

0 comments on commit b39907a

Please sign in to comment.