-
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
Conversation
distribution: 'zulu' | ||
java-version: '11' | ||
- name: Build project | ||
run: ./gradlew assemble |
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 with build
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 from main
branch, I think assemble
is enough becuz main
branch already build in this actions.
scavenger/.github/workflows/build-main.yml
Lines 1 to 34 in cbe9e95
name: Main Build | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Gradle Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Test with Gradle | |
run: ./gradlew clean build | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
report_individual_runs: true | |
check_name: "Scavenger Test Results" | |
junit_files: "**/build/test-results/**/*.xml" |
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.
We can use gradle-release
plugin if merging release
branch to main
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 is main
)
If we decide to use gradle-release
plugin, I'd like to proceed release step as follows.
1. Checkout release branch and commit release version by developer.
- It can be replaced with the gradle release plugin, but for some reason it is difficult to control it with the github action.
2. Using github actions on push event at release branch, trigger gradle-release plugin.
- This step is creating TAG.
3. Using github actions on tag event, create Release.
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
to main
branch.
Other tasks are done as Github Actions.
@junoyoon @naver/scavenger-dev If merging release branch to main is ok, release step as follows.
|
very good!!! go for it!! |
3caaa1f
to
3bce424
Compare
I rebased it with the latest |
#52
When pushed to remote repositoryrelease/*
branch, create release using github actions.The behavior is as follows.1. Checkout code2. Setup JDK3. Build project4. Extract version from commit message- Commit messages should include the release version.5. Create Releaseplz refer #55 (comment)