-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Use Github Actions for deployment #5312
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
Merged
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
95ce6be
Initial try
tobiasdiez 6ce5b35
Update gradle.yml
tobiasdiez 75bc034
Post to build.jabref.org
tobiasdiez 92c9700
Update gradle.yml
tobiasdiez 70d6325
Delete upload-to-builds.jabref.org.sh
tobiasdiez cc16838
Delete config.yml
tobiasdiez 1723c58
Update gradle.yml
tobiasdiez ff8e3fb
Set Java to 13.0.3
koppor 1f93420
Try to really set Java to 13
koppor d2eb9a7
Does JDK 1.12 work?
koppor 5cda839
Uncomment installer related stuff
tobiasdiez ff43c9d
Use jpackage
tobiasdiez 248c1e2
Fix ? build
tobiasdiez 2545032
We are using python 3 apparently
tobiasdiez 66be71b
Or not...
tobiasdiez 09010ab
Ah, we are on both at the same time...
tobiasdiez 254cd96
Fix path to jpackage
tobiasdiez 1a29693
Cleanup
tobiasdiez 79a02c9
Dont stop trying...
tobiasdiez c2712e0
Debug...
tobiasdiez e96b14f
try to fix path to jpackage
tobiasdiez be093c4
Add baces
tobiasdiez 12c1e34
Set environment variable properly
tobiasdiez 2cf9fcf
Well...
tobiasdiez 8a2b035
Dudadud...
tobiasdiez b7d8220
This is fun...
tobiasdiez f666638
Set enviornment variable directly
tobiasdiez cf50318
This is going to be somewhat frusting...
tobiasdiez 8dac085
I feel like I'm learning a lot about shell syntax today
tobiasdiez fef9577
Spaces are bad?
tobiasdiez d72ec83
C'mon...
tobiasdiez 6b15972
Fix paths?
tobiasdiez 4f9b32b
This shoud work now...
tobiasdiez e128dd1
Zips are not tars, thats suprising
tobiasdiez b2eabda
Try with url
tobiasdiez bfbc382
Make pretty
tobiasdiez 0efb873
Remove debugging output
tobiasdiez ee2043e
Rename gradle.yml to depoyment.yml
tobiasdiez 9df74a5
Rename depoyment.yml to deployment.yml
tobiasdiez 0856448
Update build.gradle
tobiasdiez 4d2635d
Fix build
tobiasdiez 92e9fb4
Does uploading works now?
tobiasdiez 99562d8
Improve installer for windows
tobiasdiez 80381b6
Remove install4j and shadowjar from gradle
tobiasdiez a316fd9
Change hostname from build-upload to build
koppor b800c8a
Does scp work?
koppor 317f0c6
Deploy to branch folder
tobiasdiez 7b4a54f
Archive portable version before upload
tobiasdiez 00255c8
Put in distribution folder
tobiasdiez ae13326
Beautify on linux and mac
tobiasdiez b7ab437
Update build.gradle
tobiasdiez af34309
Update build.gradle
tobiasdiez 701196a
Merge branch 'master' into githubActions
koppor 8ded659
Fix folder structure in archive
tobiasdiez 31382b6
Try to fix dev version string in about dialog
tobiasdiez 621df85
Remove oss.soatype.org since this is constantly failing lately
tobiasdiez b7412c9
Add dev switch
tobiasdiez 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,87 @@ | ||
name: Deployment | ||
|
||
on: [push] | ||
|
||
jobs: | ||
deploy: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
include: | ||
- os: ubuntu-latest | ||
displayName: linux | ||
jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_linux-x64_bin.tar.gz | ||
jdk14Path: /jdk-14 | ||
archivePortable: tar -czf build/distribution/JabRef-portable_linux.tar.gz -C build/distribution JabRef && rm -R build/distribution/JabRef | ||
- os: windows-latest | ||
displayName: windows | ||
jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_windows-x64_bin.zip | ||
jdk14Path: /jdk-14 | ||
archivePortable: 7z a -r build/distribution/JabRef-portable_windows.zip build/distribution/JabRef/ && rm -R build/distribution/JabRef | ||
- os: macOS-latest | ||
displayName: macOS | ||
jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz | ||
jdk14Path: /jdk-14.jdk/Contents/Home | ||
archivePortable: tar -czf build/distribution/JabRef-portable_macos.tar.gz -C build/distribution JabRef.app && rm -R build/distribution/JabRef.app | ||
|
||
runs-on: ${{ matrix.os }} | ||
name: Deploy on ${{ matrix.displayName }} | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v1 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11.0.4 | ||
- name: Download jpackage | ||
# We need to download jpackage from https://jdk.java.net/jpackage/ | ||
run: | | ||
import tarfile | ||
import zipfile | ||
import sys | ||
if sys.version_info[0] >= 3: | ||
from urllib.request import urlretrieve | ||
else: | ||
from urllib import urlretrieve | ||
|
||
url = "${{ matrix.jpackageDownload }}" | ||
tmpfile, headers = urlretrieve(url) | ||
if (url.endswith("tar.gz")): | ||
tar = tarfile.open(tmpfile) | ||
tar.extractall() | ||
tar.close() | ||
elif (url.endswith("zip")): | ||
zip = zipfile.ZipFile(tmpfile) | ||
zip.extractall() | ||
zip.close() | ||
shell: python | ||
- name: Build runtime image | ||
run: ./gradlew -Pdev=true jlinkZip | ||
- name: Build installer | ||
run: | | ||
export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}" | ||
./gradlew -Pdev=true jpackage | ||
shell: bash | ||
- name: Add installer as artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: JabRef-${{ matrix.displayName }} | ||
path: build/distribution | ||
- name: Package application image | ||
run: ${{ matrix.archivePortable }} | ||
shell: bash | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
- name: Upload to builds.jabref.org | ||
uses: garygrossgarten/github-action-scp@release | ||
with: | ||
local: build/distribution | ||
remote: www/${{ steps.extract_branch.outputs.branch }} | ||
host: builds.jabref.org | ||
username: builds_jabref_org | ||
privateKey: ${{ secrets.buildJabRefPrivateKey }} | ||
port: 9922 |
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.
Uh oh!
There was an error while loading. Please reload this page.