mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-20 11:41:26 +00:00
create buildkit via CI
This commit is contained in:
239
.github/workflows/build.yml
vendored
239
.github/workflows/build.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
[push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
test:
|
||||
name: Build and Test
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 16
|
||||
- uses: actions/cache@v1
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
@@ -30,120 +30,143 @@ jobs:
|
||||
env:
|
||||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
continue-on-error: true
|
||||
### TODO: move to matrix build:
|
||||
- name: Assemble buildkit-linux.zip
|
||||
run: mvn -B clean package -DskipTests -Plinux
|
||||
- name: Upload buildkit-linux.zip
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: buildkit-linux.zip
|
||||
path: target/buildkit-linux.zip
|
||||
- name: Assemble buildkit-mac.zip
|
||||
run: mvn -B clean package -DskipTests -Pmac
|
||||
- name: Upload buildkit-mac.zip
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: buildkit-mac.zip
|
||||
path: target/buildkit-mac.zip
|
||||
- name: Assemble buildkit-win.zip
|
||||
run: mvn -B clean package -DskipTests -Pwindows
|
||||
- name: Upload buildkit-win.zip
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: buildkit-win.zip
|
||||
path: target/buildkit-win.zip
|
||||
|
||||
release:
|
||||
name: Draft a Release on GitHub Releases
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'cryptomator/cryptomator'
|
||||
#
|
||||
# Buildkit
|
||||
#
|
||||
|
||||
buildkit:
|
||||
name: Build buildkit-${{ matrix.profile }}.zip
|
||||
needs: test
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
profile: linux
|
||||
launcher: launcher-linux.sh
|
||||
- os: windows-latest
|
||||
profile: win
|
||||
launcher: launcher-win.bat
|
||||
- os: macOS-latest
|
||||
profile: mac
|
||||
launcher: launcher-mac.sh
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Download buildkit-linux.zip
|
||||
uses: actions/download-artifact@v1
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
name: buildkit-linux.zip
|
||||
path: .
|
||||
- name: Download buildkit-mac.zip
|
||||
uses: actions/download-artifact@v1
|
||||
java-version: 16
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
name: buildkit-mac.zip
|
||||
path: .
|
||||
- name: Download buildkit-win.zip
|
||||
uses: actions/download-artifact@v1
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Copy .jar files
|
||||
run: mvn -B clean package -DskipTests -P${{ matrix.profile }}
|
||||
shell: bash
|
||||
- name: Archive buildkit-${{ matrix.profile }}.tar.gz
|
||||
run: tar -czf buildkit-${{ matrix.profile }}.tar.gz libs mods ../LICENSE.txt ../dist/${{ matrix.launcher }}
|
||||
shell: bash
|
||||
working-directory: target
|
||||
- name: Upload buildkit-${{ matrix.profile }}.tar.gz
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: buildkit-win.zip
|
||||
path: .
|
||||
- name: Create tarball
|
||||
run: git archive --prefix="cryptomator-${{ github.ref }}/" -o "cryptomator-${{ github.ref }}.tar.gz" ${{ github.ref }}
|
||||
- name: Sign tarball with key 615D449FE6E6A235
|
||||
run: |
|
||||
echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
|
||||
echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a "cryptomator-${{ github.ref }}.tar.gz"
|
||||
env:
|
||||
GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
|
||||
GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
body: |
|
||||
:construction: Work in Progress
|
||||
name: buildkit-${{ matrix.profile }}.tar.gz
|
||||
path: target/buildkit-${{ matrix.profile }}.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
TODO:
|
||||
* [ ] add Linux appimage, zsync file and signature file
|
||||
* [ ] add Windows installer and signature file
|
||||
* [ ] add MacOs disk image and signature file
|
||||
# release:
|
||||
# name: Draft a Release on GitHub Releases
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: test
|
||||
# if: startsWith(github.ref, 'refs/tags/') && github.repository == 'cryptomator/cryptomator'
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# - name: Download buildkit-linux.zip
|
||||
# uses: actions/download-artifact@v1
|
||||
# with:
|
||||
# name: buildkit-linux.zip
|
||||
# path: .
|
||||
# - name: Download buildkit-mac.zip
|
||||
# uses: actions/download-artifact@v1
|
||||
# with:
|
||||
# name: buildkit-mac.zip
|
||||
# path: .
|
||||
# - name: Download buildkit-win.zip
|
||||
# uses: actions/download-artifact@v1
|
||||
# with:
|
||||
# name: buildkit-win.zip
|
||||
# path: .
|
||||
# - name: Create tarball
|
||||
# run: git archive --prefix="cryptomator-${{ github.ref }}/" -o "cryptomator-${{ github.ref }}.tar.gz" ${{ github.ref }}
|
||||
# - name: Sign tarball with key 615D449FE6E6A235
|
||||
# run: |
|
||||
# echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
|
||||
# echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a "cryptomator-${{ github.ref }}.tar.gz"
|
||||
# env:
|
||||
# GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
|
||||
# GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
|
||||
# - name: Create Release
|
||||
# id: create_release
|
||||
# uses: actions/create-release@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# tag_name: ${{ github.ref }}
|
||||
# release_name: ${{ github.ref }}
|
||||
# body: |
|
||||
# :construction: Work in Progress
|
||||
|
||||
## What's new
|
||||
# TODO:
|
||||
# * [ ] add Linux appimage, zsync file and signature file
|
||||
# * [ ] add Windows installer and signature file
|
||||
# * [ ] add MacOs disk image and signature file
|
||||
|
||||
## Bugfixes
|
||||
# ## What's new
|
||||
|
||||
## Misc
|
||||
# ## Bugfixes
|
||||
|
||||
---
|
||||
# ## Misc
|
||||
|
||||
:scroll: A complete list of closed issues is available [here](LINK)
|
||||
draft: true
|
||||
prerelease: false
|
||||
- name: Upload buildkit-linux.zip to GitHub Releases
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: buildkit-linux.zip
|
||||
asset_name: buildkit-linux.zip
|
||||
asset_content_type: application/zip
|
||||
- name: Upload buildkit-mac.zip to GitHub Releases
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: buildkit-mac.zip
|
||||
asset_name: buildkit-mac.zip
|
||||
asset_content_type: application/zip
|
||||
- name: Upload buildkit-win.zip to GitHub Releases
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: buildkit-win.zip
|
||||
asset_name: buildkit-win.zip
|
||||
asset_content_type: application/zip
|
||||
- name: Upload tarball signature to GitHub Releases
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "cryptomator-${{ github.ref }}.tar.gz.asc"
|
||||
asset_name: "cryptomator-${{ github.ref }}.tar.gz.asc"
|
||||
asset_content_type: application/octet-stream
|
||||
# ---
|
||||
|
||||
# :scroll: A complete list of closed issues is available [here](LINK)
|
||||
# draft: true
|
||||
# prerelease: false
|
||||
# - name: Upload buildkit-linux.zip to GitHub Releases
|
||||
# uses: actions/upload-release-asset@v1.0.1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: buildkit-linux.zip
|
||||
# asset_name: buildkit-linux.zip
|
||||
# asset_content_type: application/zip
|
||||
# - name: Upload buildkit-mac.zip to GitHub Releases
|
||||
# uses: actions/upload-release-asset@v1.0.1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: buildkit-mac.zip
|
||||
# asset_name: buildkit-mac.zip
|
||||
# asset_content_type: application/zip
|
||||
# - name: Upload buildkit-win.zip to GitHub Releases
|
||||
# uses: actions/upload-release-asset@v1.0.1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: buildkit-win.zip
|
||||
# asset_name: buildkit-win.zip
|
||||
# asset_content_type: application/zip
|
||||
# - name: Upload tarball signature to GitHub Releases
|
||||
# uses: actions/upload-release-asset@v1.0.1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: "cryptomator-${{ github.ref }}.tar.gz.asc"
|
||||
# asset_name: "cryptomator-${{ github.ref }}.tar.gz.asc"
|
||||
# asset_content_type: application/octet-stream
|
||||
|
||||
Reference in New Issue
Block a user