-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add release github actions #55
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,35 @@ | ||
name: Release | ||
|
||
run-name: Create Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- name: Extract tag version | ||
run: echo "tag=$(echo '${{ github.ref_name }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" >> $GITHUB_OUTPUT | ||
id: extract_tag_version | ||
- name: Build project | ||
run: ./gradlew assemble | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
token: ${{ secrets.RELEASE_ACTIONS_TOKEN }} | ||
files: | | ||
./scavenger-agent-java/build/libs/scavenger-agent-java-${{ steps.extract_tag_version.outputs.tag }}.jar | ||
./scavenger-old-agent-java/build/libs/scavenger-old-agent-java-${{ steps.extract_tag_version.outputs.tag }}.jar | ||
./scavenger-api/build/libs/scavenger-api-boot-${{ steps.extract_tag_version.outputs.tag }}.jar | ||
./scavenger-collector/build/libs/scavenger-collector-boot-${{ steps.extract_tag_version.outputs.tag }}.jar | ||
generate_release_notes: true |
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,30 @@ | ||
name: Tag | ||
|
||
run-name: Create Tag | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
if_merged: | ||
if: github.event.pull_request.merged == true && startsWith( github.event.pull_request.title, 'release' ) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.RELEASE_ACTIONS_TOKEN }} | ||
- name: Extract version | ||
run: echo "version=$(echo '${{ github.event.pull_request.title }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" >> $GITHUB_OUTPUT | ||
id: extract_version | ||
- name: Set git config | ||
run: | | ||
git config user.name sohyun-ku | ||
git config user.email [email protected] | ||
git branch release/${{ steps.extract_version.outputs.version }} | ||
- name: Create tag | ||
run: ./gradlew :release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ steps.extract_version.outputs.version }} |
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
version=1.0.5-SNAPSHOT | ||
kotlin.code.style=official | ||
restAssuredVersion=4.3.3 | ||
springDataJdbcPlusVersion=2.2.3 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only do assemble...
Don't we need release plugin replace SNAHOP version to empty string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assemble
doesn't run a test. How about replacing it withbuild
task?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@junoyoon
This action is just create release & tag when pushed
release/*
branch.So if we want to replace SNAPSHOT version to empty string, we'll have to do it by self.
I was some confusion because the operation of the
gradle-release plugin
was different from the current release step.It seems to have a similar operation to what you said this #52 (comment), so I'll check again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taeyeon-Kim
If we create
release
branch frommain
branch, I thinkassemble
is enough becuzmain
branch already build in this actions.scavenger/.github/workflows/build-main.yml
Lines 1 to 34 in cbe9e95
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@junoyoon
We can use
gradle-release
plugin if mergingrelease
branch tomain
is ok.Using
gradle-release
commits tag version and new version at working branch.We want to create tag at release branch, we can use
pushReleaseVersionBranch
option. (reference)But using
pushReleaseVersionBranch
will checkout to the release branch and merge from the working branch.If we don't use
pushReleaseVersionBarnch
option, just commit working branch.(in our case maybe working branch ismain
)If we decide to use
gradle-release
plugin, I'd like to proceed release step as follows.cc. @naver/scavenger-dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will review this weekend? ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@junoyoon
#55 (comment) is outdated.
plz refer #55 (comment)
When release, we only have to Pull Request
develop
tomain
branch.Other tasks are done as Github Actions.