-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b22a9fd
commit 9f3225e
Showing
1 changed file
with
18 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ name: Create Release | |
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
|
@@ -11,35 +10,38 @@ env: | |
|
||
jobs: | ||
build: | ||
name: Upload Release Asset | ||
name: Main | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set env | ||
run: | | ||
echo "RELEASE_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
echo "RELEASE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
- name: Build project | ||
run: mvn -B package -Passembly --file pom.xml -Drevision=${{ env.RELEASE_NAME }} | ||
- name: Create Release | ||
|
||
- name: Delete ${{ env.RELEASE_NAME }} release | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
delete_release: true # default: false | ||
tag_name: ${{ env.RELEASE_NAME }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: Release ${{ env.RELEASE_NAME }} | ||
tag_name: ${{ env.RELEASE_NAME }} | ||
release_name: Release ${{ env.RELEASE_NAME }} | ||
body: Release ${{ env.RELEASE_NAME }} | ||
draft: false | ||
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: ./debezium-server-dist/target/debezium-server-dist-${{ env.RELEASE_NAME }}.zip | ||
asset_name: debezium-server-dist-${{ env.RELEASE_NAME }}.zip | ||
asset_content_type: application/zip | ||
files: debezium-server-dist/target/debezium-server-dist-${{ env.RELEASE_NAME }}.zip |