-
Notifications
You must be signed in to change notification settings - Fork 64
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
6 changed files
with
50 additions
and
31 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,12 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
cd /toolkit | ||
|
||
# move build files into source dir | ||
mkdir -p /toolkit/source | ||
cp -R $TRAVIS_BUILD_DIR /toolkit/source/homebridge-syno-spk | ||
cp -R $GITHUB_WORKSPACE /toolkit/source/homebridge-syno-spk | ||
|
||
# build spk | ||
./pkgscripts-ng/PkgCreate.py -c homebridge-syno-spk | ||
./pkgscripts-ng/PkgCreate.py -c homebridge-syno-spk -S |
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,10 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
PKG_VERSION=$(cat $TRAVIS_BUILD_DIR/INFO.sh | grep version | awk -F '"' '{ print $2 }') | ||
PKG_VERSION=$(cat $GITHUB_WORKSPACE/INFO.sh | grep version | awk -F '"' '{ print $2 }') | ||
|
||
mkdir $TRAVIS_BUILD_DIR/github-release | ||
mkdir $GITHUB_WORKSPACE/github-release | ||
|
||
cp /toolkit/result_spk/HomebridgeDocker-${PKG_VERSION}/HomebridgeDocker-x86_64-${PKG_VERSION}.spk $TRAVIS_BUILD_DIR/github-release/ | ||
cp /toolkit/result_spk/HomebridgeDocker-${PKG_VERSION}/HomebridgeDocker-x86_64-${PKG_VERSION}.spk $GITHUB_WORKSPACE/github-release/ |
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,6 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
# create base | ||
mkdir /toolkit | ||
|
@@ -11,26 +12,3 @@ git clone https://github.com/SynologyOpenSource/pkgscripts-ng.git | |
|
||
# deploy chroot env | ||
./pkgscripts-ng/EnvDeploy -q -v 6.0 -p x64 | ||
|
||
# this gpg key is never going to be validated so it does not need to be secure | ||
cat >foo <<EOF | ||
Key-Type: RSA | ||
Key-Length: 2048 | ||
Subkey-Type: RSA | ||
Subkey-Length: 2048 | ||
Name-Real: @oznu | ||
Name-Comment: not my real gpg key | ||
Name-Email: [email protected] | ||
Expire-Date: 0 | ||
%commit | ||
%echo done | ||
EOF | ||
|
||
gpg --batch --gen-key foo | ||
|
||
# copy gpg keys into chroot env | ||
mkdir -p /toolkit/build_env/ds.x64-6.0/home/travis/ | ||
cp -R /home/travis/.gnupg /toolkit/build_env/ds.x64-6.0/root/.gnupg | ||
cp -R /home/travis/.gnupg /toolkit/build_env/ds.x64-6.0/home/travis/.gnupg | ||
chown -R root:root /toolkit/build_env/ds.x64-6.0/root/.gnupg /toolkit/build_env/ds.x64-6.0/home/travis/.gnupg | ||
chmod -R 600 /toolkit/build_env/ds.x64-6.0/root/.gnupg /toolkit/build_env/ds.x64-6.0/home/travis/.gnupg |
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,39 @@ | ||
name: "Build" | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Environment | ||
run: sudo -E ./.ci/setup.sh | ||
|
||
- name: Build Package | ||
run: sudo -E ./.ci/build.sh | ||
|
||
- name: Deploy | ||
run: sudo -E ./.ci/deploy.sh | ||
|
||
- name: Get Release Asset File Name | ||
id: get_release_asset_name | ||
run: | | ||
export ASSET_NAME=$(basename github-release/*.spk) | ||
echo $ASSET_NAME | ||
echo ::set-output name=ASSET_NAME::${ASSET_NAME} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: github-release/${{ steps.get_release_asset_name.outputs.ASSET_NAME }} | ||
asset_name: ${{ steps.get_release_asset_name.outputs.ASSET_NAME }} | ||
asset_content_type: application/gzip |
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
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