-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
118 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# release.yml | ||
|
||
changelog: | ||
|
||
exclude: | ||
labels: | ||
- ignore-for-release | ||
|
||
categories: | ||
|
||
- title: New Features | ||
labels: | ||
- enhancement | ||
|
||
- title: Bug fixes | ||
labels: | ||
- bug | ||
|
||
- title: Other Changes | ||
labels: | ||
- "*" |
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Mule Migration Assistant Release | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
|
||
release: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: maven-settings-xml-action | ||
uses: whelk-io/maven-settings-xml-action@v10 | ||
with: | ||
repositories: '[{ "id": "mulesoft-public", "url": "https://repository.mulesoft.org/nexus/content/repositories/public" }, | ||
{ "id": "mule-releases", "url": "https://repository.mulesoft.org/releases" }]' | ||
|
||
- name: log-settings | ||
run: cat \/home\/runner\/.m2\/settings.xml | ||
|
||
- name: Build with Maven | ||
run: mvn --settings /home/runner/.m2/settings.xml clean install --file pom.xml | ||
|
||
- name: Guess Release Version | ||
run: | | ||
echo "RELEASE_VERSION=$(echo '${{github.ref}}' | sed -e 's,.*/v\(.*\),\1,')" >> $GITHUB_ENV | ||
#GH RELEASE | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
|
||
- name: Upload Release Asset tgz | ||
id: upload-release-asset-tgz | ||
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: ./runner/target/mule-migration-assistant-runner-${{env.RELEASE_VERSION}}.tar.gz | ||
asset_name: mule-migration-assistant-runner-${{env.RELEASE_VERSION}}.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload Release Asset zip | ||
id: upload-release-asset-zip | ||
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: ./runner/target/mule-migration-assistant-runner-${{env.RELEASE_VERSION}}.zip | ||
asset_name: mule-migration-assistant-runner-${{env.RELEASE_VERSION}}.zip | ||
asset_content_type: application/zip |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
current=$(cat pom.xml | grep '<version>.*' | head -1 | sed 's/.*<version>\([^<]*\).*/\1/') | ||
|
||
if [[ -z $current ]] | ||
then | ||
echo "Current version not found!" | ||
exit 1 | ||
fi | ||
|
||
read -p "Enter version to update to (current is ${current}): " -r | ||
echo | ||
if [[ $REPLY =~ ^[1-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?$ ]] | ||
then | ||
mvn versions:set -DnewVersion=${REPLY} | ||
pushd target-modules | ||
mvn versions:set -DnewVersion=${REPLY} | ||
popd target-modules | ||
else | ||
echo "Invalid version: $REPLY" | ||
exit 2 | ||
fi |