Skip to content

Commit

Permalink
Merge pull request #582 from AndreKurait/MavenReleaseVersionUpdate
Browse files Browse the repository at this point in the history
Update Release Drafter and Traffic Capture to define a variable for publishing version based on tag
  • Loading branch information
AndreKurait authored Apr 16, 2024
2 parents 5743157 + 2b853a9 commit 4ec659b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ jobs:
approvers: ${{ steps.get_data.outputs.approvers }}
minimum-approvals: 2
issue-title: 'Release opensearch-migrations version ${{ steps.get_data.outputs.version }}'
issue-body: "Please approve or deny the release of opensearch-migrations **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }} **VERSION** : ${{ steps.get_data.outputs.version }} "
issue-body: "This release requires approval from at least two reviewers. Please approve or deny the release of opensearch-migrations **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }} **VERSION**: ${{ steps.get_data.outputs.version }}. The published TrafficCapture version will be 0.${{ steps.get_data.outputs.version }}."
exclude-workflow-initiator-as-approver: true
- name: Download Repo Tar
# Preface Traffic Capture version with 0. to signal interface immaturity
run: |
wget https://github.com/opensearch-project/opensearch-migrations/archive/refs/tags/${{ steps.get_data.outputs.version }}.tar.gz -O artifacts.tar.gz
(cd TrafficCapture && ./gradlew publishMavenJavaPublicationToMavenRepository -Dbuild.snapshot=false && tar -C build -cvf traffic-capture-artifacts.tar.gz repository)
(cd TrafficCapture && ./gradlew publishMavenJavaPublicationToMavenRepository -Dbuild.snapshot=false -Dbuild.version=0.${{ steps.get_data.outputs.version }} && tar -C build -cvf traffic-capture-artifacts.tar.gz repository)
- name: Draft a release
uses: softprops/action-gh-release@v2
with:
Expand Down
4 changes: 3 additions & 1 deletion TrafficCapture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ subprojects {


group = 'org.opensearch.migrations.trafficcapture'
version = '0.1.0'

// support -Dbuild.version, but include default
version = System.getProperty("build.version", "0.1.0")

// support -Dbuild.snapshot=false, but default to true
if (System.getProperty("build.snapshot", "true") == "true") {
Expand Down

0 comments on commit 4ec659b

Please sign in to comment.