forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speedup "deployment" (to builds.jabref.org) (JabRef#10051)
- Loading branch information
Showing
2 changed files
with
27 additions
and
22 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 |
---|---|---|
|
@@ -117,7 +117,6 @@ jobs: | |
--file-associations buildres/mac/bibtexAssociations.properties \ | ||
--jlink-options --bind-services | ||
- name: Build pkg (macos) | ||
if: (matrix.os == 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES') | ||
shell: bash | ||
run: | | ||
${{env.JDK21}}/Contents/Home/bin/jpackage \ | ||
|
@@ -166,8 +165,7 @@ jobs: | |
with: | ||
name: JabRef-${{ matrix.displayName }} | ||
path: build/distribution | ||
- name: Deploy to builds.jabref.org | ||
id: deploy | ||
- name: Upload to builds.jabref.org (TODO - won't run on Mac, because Dockerized action) | ||
uses: Pendect/[email protected] | ||
env: | ||
DEPLOY_KEY: ${{ secrets.buildJabRefPrivateKey }} | ||
|
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 |
---|---|---|
|
@@ -87,7 +87,7 @@ jobs: | |
java-version: 20 | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
- name: setup jdk JabRef-fix windows | ||
- name: setup jdk JabRef-fix (windows) | ||
if: (matrix.os == 'windows-latest') | ||
shell: bash | ||
run: | | ||
|
@@ -101,7 +101,7 @@ jobs: | |
cat gradle.properties | ||
sed -i "s/JavaLanguageVersion.of(20)/JavaLanguageVersion.of(21)/" build.gradle | ||
- name: setup jdk JabRef-fix ubuntu | ||
- name: setup jdk JabRef-fix (ubuntu) | ||
if: (matrix.os == 'ubuntu-latest') | ||
shell: bash | ||
run: | | ||
|
@@ -115,7 +115,7 @@ jobs: | |
cat gradle.properties | ||
sed -i "s/JavaLanguageVersion.of(20)/JavaLanguageVersion.of(21)/" build.gradle | ||
- name: setup jdk JabRef-fix mac | ||
- name: setup jdk JabRef-fix (macos) | ||
if: (matrix.os == 'macos-latest') | ||
shell: bash | ||
run: | | ||
|
@@ -130,14 +130,14 @@ jobs: | |
cat gradle.properties | ||
sed -i'.bak' -e "s/JavaLanguageVersion.of(20)/JavaLanguageVersion.of(21)/" build.gradle | ||
- name: Setup OSX key chain on OSX | ||
- name: Setup OSX key chain (macos) | ||
if: (matrix.os == 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES') | ||
uses: apple-actions/import-codesign-certs@v2 | ||
with: | ||
p12-file-base64: ${{ secrets.OSX_SIGNING_CERT }} | ||
p12-password: ${{ secrets.OSX_CERT_PWD }} | ||
keychain-password: jabref | ||
- name: Setup OSX key chain on OSX for app id cert | ||
- name: Setup OSX key chain on OSX for app id cert (macos) | ||
if: (matrix.os == 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES') | ||
uses: apple-actions/import-codesign-certs@v2 | ||
with: | ||
|
@@ -222,8 +222,20 @@ jobs: | |
ar -m -c -a sdsd jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}_amd64_repackaged.deb debian-binary control.tar.xz data.tar.xz | ||
rm debian-binary control.tar.* data.tar.* | ||
mv -f jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}_amd64_repackaged.deb jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}_amd64.deb | ||
- name: Upload to GitHub workflow artifacts store (non-macos) | ||
if: (matrix.os != 'macos-latest') | ||
- name: Upload to builds.jabref.org (ubuntu) | ||
if: (matrix.os == 'ubuntu-latest') && (steps.checksecrets.outputs.secretspresent == 'YES') | ||
uses: Pendect/[email protected] | ||
env: | ||
DEPLOY_KEY: ${{ secrets.buildJabRefPrivateKey }} | ||
BRANCH: ${{ steps.gitversion.outputs.branchName }} | ||
with: | ||
flags: -vaz --itemize-changes --stats --partial-dir=/tmp/partial --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" | ||
options: '' | ||
ssh_options: '-p 9922' | ||
src: 'build/distribution/' | ||
dest: [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ | ||
- name: Upload to GitHub workflow artifacts store (windows) | ||
if: (matrix.os == 'windows-latest') | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: JabRef-${{ matrix.displayName }} | ||
|
@@ -293,10 +305,10 @@ jobs: | |
with: | ||
name: JabRef-macOS | ||
path: build/distribution | ||
deploy: | ||
upload: | ||
strategy: | ||
fail-fast: false | ||
name: Deploy binaries on builds.jabref.org | ||
name: Upload binaries on builds.jabref.org | ||
runs-on: ubuntu-latest | ||
needs: [build, notarize] | ||
steps: | ||
|
@@ -326,32 +338,27 @@ jobs: | |
if: steps.checksecrets.outputs.secretspresent == 'YES' | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
- name: Get linux binaries | ||
if: steps.checksecrets.outputs.secretspresent == 'YES' | ||
uses: actions/download-artifact@master | ||
with: | ||
name: JabRef-linux | ||
path: build/distribution | ||
- name: Get windows binaries | ||
if: steps.checksecrets.outputs.secretspresent == 'YES' | ||
uses: actions/download-artifact@master | ||
with: | ||
name: JabRef-windows | ||
path: build/distribution | ||
- name: Get macOS binaries unsigned | ||
if: steps.checksecrets.outputs.secretspresent == 'YES' && ! (${{ inputs.notarization }})) && ! (startsWith(github.ref, 'refs/tags/') | ||
if: (steps.checksecrets.outputs.secretspresent == 'YES') && ! (${{ inputs.notarization }})) && ! (startsWith(github.ref, 'refs/tags/') | ||
uses: actions/download-artifact@master | ||
with: | ||
name: JabRef-macOS-tbn | ||
path: build/distribution/ | ||
- name: Get macOS binaries notarized | ||
if: (startsWith(github.ref, 'refs/tags/') || (${{ inputs.notarization }})) && (steps.checksecrets.outputs.secretspresent == 'YES') | ||
if: (steps.checksecrets.outputs.secretspresent == 'YES') && ((${{ inputs.notarization }})) || (startsWith(github.ref, 'refs/tags/')) | ||
uses: actions/download-artifact@master | ||
with: | ||
name: JabRef-macOS | ||
path: build/distribution/ | ||
- name: Deploy to builds.jabref.org | ||
id: deploy | ||
# Upload to build server using rsync | ||
# The action runs on linux only (because it is a Dockerized action), therefore it is embedded in a separate workflow | ||
- name: Upload to builds.jabref.org | ||
if: steps.checksecrets.outputs.secretspresent == 'YES' | ||
uses: Pendect/[email protected] | ||
env: | ||
|