-
Notifications
You must be signed in to change notification settings - Fork 22
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
GitHub action for automatizing shup release with openWebStart configu… #2232
Open
LaurentPV
wants to merge
6
commits into
fli-iam:develop
Choose a base branch
from
LaurentPV:laurent_1974
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fa3d87e
GitHub action for automatizing shup release with openWebStart configu…
LaurentPV 083c00d
Update shup.jnlp with /fli-iam repository url
LaurentPV 43ad63e
Update codebase url in shup.jnlp
LaurentPV 669feb1
report test branch modifications
LaurentPV d499846
Adding conditionnal jarsigning to allow local mvn builds
LaurentPV 36b470d
Code review comments. Adding an update of RELEASE_DATE constant with …
LaurentPV 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,84 @@ | ||
name: Java CI to create and upload Shanoir Uploader release on pull request | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths: | ||
- 'shanoir-uploader/**' | ||
pull_request: | ||
branches: [ "master" ] | ||
paths: | ||
- 'shanoir-uploader/**' | ||
|
||
env: | ||
build-number: ${GITHUB_RUN_NUMBER} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Install libxml2-utils | ||
run: sudo apt-get update && sudo apt-get install -y libxml2-utils | ||
|
||
- name: Extract Project Version | ||
id: get_version | ||
run: | | ||
VERSION=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='version']/text()" shanoir-uploader/pom.xml) | ||
echo ::set-output name=version::$VERSION | ||
|
||
- name: Decode and write keystore | ||
run: | | ||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > shanoir-uploader/keystore.jks | ||
|
||
- name: Build shanoir-ng with Maven | ||
run: mvn -f shanoir-ng-parent/pom.xml clean install -DskipTests | ||
env: | ||
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }} | ||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
|
||
|
||
- name: Build shanoir-uploader with Maven | ||
run: mvn -f shanoir-uploader/pom.xml package -DskipSigning=false | ||
env: | ||
MAVEN_OPTS: "-Djavax.net.ssl.trustStore=shanoir-uploader/keystore.jks -Djavax.net.ssl.trustStorePassword=${{ secrets.KEYSTORE_PASS }}" | ||
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }} | ||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
|
||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.get_version.outputs.version }} | ||
release_name: 'Release ${{ steps.get_version.outputs.version }}' | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: shanoir-uploader/target/shanoir-uploader-${{ steps.get_version.outputs.version }}-jar-with-dependencies.jar | ||
asset_name: shanoir-uploader-${{ steps.get_version.outputs.version }}-jar-with-dependencies.jar | ||
asset_content_type: application/java-archive | ||
|
||
- name: Upload JNLP Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: shanoir-uploader/target/ShanoirUploader.jnlp | ||
asset_name: ShanoirUploader.jnlp | ||
asset_content_type: application/x-java-jnlp-file |
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<jnlp spec="1.0+" codebase="https://github.com/fli-iam/shanoir-ng/releases/latest/download/" href="ShanoirUploader.jnlp"> | ||
<information> | ||
<title>Shanoir Uploader</title> | ||
LaurentPV marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<vendor>Empenn Team - Inria</vendor> | ||
<homepage href="https://project.inria.fr/shanoir/" /> | ||
<description>Desktop client for the Shanoir server</description> | ||
<icon href="https://raw.githubusercontent.com/fli-iam/shanoir-ng/master/shanoir-uploader/src/main/resources/images/simpleLogo.64x64.png"/> | ||
</information> | ||
<security> | ||
<all-permissions/> | ||
</security> | ||
<resources> | ||
<j2se version="17+" /> | ||
<jar href="shanoir-uploader-${project.version}-jar-with-dependencies.jar" /> | ||
</resources> | ||
<application-desc main-class="org.shanoir.uploader.ShanoirUploader" /> | ||
</jnlp> |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
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.
Hi @LaurentPV, I wonder, if we should do something on each pull request or only, when something goes on master? I think even with each new integration into master, we will not release a new version of ShUp. I think it would be interesting for each push into master to create a new "timestamp" in RELEASE_DATE on ShUpConfig.
I think the process of having a new version, as today the tags for the prod release by Anthony are driven by a human decision, not by an integration on master. With kind regards, Michael
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.
Ok, I will add a new commit modifying the RELEASE_DATE constant with the timestamp of the push on master branch.
Do you mean that the tag of the release should be the release_date instead of the release_version ?
It seems weird not to have the tag of a version linked to a release but in the same time it would be more convenient because it assures the uniqueness of each release tag. For now if you forget to modify the version in the pom.xml before pushing into master the release will fail because the previous release exists already.