-
Notifications
You must be signed in to change notification settings - Fork 30
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
1 changed file
with
14 additions
and
38 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 |
---|---|---|
@@ -1,9 +1,4 @@ | ||
name: Create release (draft) | ||
# Workflow is triggered when any pom-file is updated in master-branch | ||
# If both pom-files have the same version number it | ||
# - builds NeqSim-jars both in Java 8 and Java 11 | ||
# - creates a new release and uploads the jars as artifacts | ||
# - makes a new branch in neqsimpython and updates the jar-files used there. | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -63,7 +58,7 @@ jobs: | |
run: mkdir staging && cp target/neqsim*Java8.jar staging | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: jarfiles | ||
name: jarfiles-java8 | ||
path: staging | ||
|
||
compile_java_11: | ||
|
@@ -88,7 +83,7 @@ jobs: | |
run: mkdir staging && cp target/neqsim*.jar staging | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: jarfiles | ||
name: jarfiles-java11 | ||
path: staging | ||
|
||
compile_java_21: | ||
|
@@ -115,19 +110,27 @@ jobs: | |
run: mkdir staging && cp target/neqsim*Java21.jar staging | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: jarfiles | ||
name: jarfiles-java21 | ||
path: staging | ||
|
||
create_release: | ||
name: Create release v${{ needs.get_versions.outputs.version_8 }} | ||
runs-on: ubuntu-latest | ||
needs: [get_versions, compile_java_8, compile_java_11] | ||
needs: [get_versions, compile_java_8, compile_java_11, compile_java_21] | ||
|
||
steps: | ||
- name: Download jar files from artifacts | ||
- name: Download java 8 jar files | ||
uses: actions/[email protected] | ||
with: | ||
name: jarfiles | ||
name: jarfiles-java8 | ||
- name: Download java 11 jar files | ||
uses: actions/[email protected] | ||
with: | ||
name: jarfiles-java11 | ||
- name: Download java 21 jar files | ||
uses: actions/[email protected] | ||
with: | ||
name: jarfiles-java21 | ||
|
||
- name: Create release v${{ needs.get_versions.outputs.version_8 }} | ||
uses: ncipollo/[email protected] | ||
|
@@ -137,32 +140,5 @@ jobs: | |
draft: true | ||
generateReleaseNotes: true | ||
skipIfReleaseExists: true | ||
artifactErrorsFailBuild: true | ||
artifacts: "*.jar" | ||
artifactContentType: application/java-archive | ||
|
||
# # Needs to delete the old jars manually | ||
# - run: mkdir lib && cp *.jar lib/ | ||
# - run: cd lib && mkdir libj8 && mv *Java8.jar libj8/ && cd .. | ||
|
||
# - name: Create release branch in neqsimpython repo | ||
# uses: GuillaumeFalourd/[email protected] | ||
# with: | ||
# repository_owner: Equinor | ||
# repository_name: neqsimpython | ||
# new_branch_name: NeqSim-jars-updated-${{ needs.get_versions.outputs.version_8 }} | ||
# ssh_deploy_key: ${{ secrets.SSH_DEPLOY_KEY }} | ||
|
||
# - name: Push directory to another repository | ||
# uses: cpina/[email protected] | ||
# env: | ||
# SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | ||
# with: | ||
# source-directory: 'lib' | ||
# destination-github-username: 'equinor' | ||
# destination-repository-name: 'neqsimpython' | ||
# user-email: [email protected] | ||
# target-branch: NeqSim-jars-updated-${{ needs.get_versions.outputs.version_8 }} | ||
# target-directory: neqsim/lib | ||
# commit_message: 'chore: updated jar-files' | ||
|