Skip to content

Commit

Permalink
GitHub Action: Added the ability to publish to syncocommunity
Browse files Browse the repository at this point in the history
  • Loading branch information
publicarray committed Mar 15, 2021
1 parent 9889754 commit 1bc9cfa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/actions/build-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ echo "$GH_PACKAGE"

# use TCVERSION and ARCH parameters to get real exit code.
make TCVERSION=${GH_ARCH##*-} ARCH=${GH_ARCH%%-*} -C spk/${GH_PACKAGE}

# publish to synocommunity.com when the API key is set
if [-n $API_KEY ]; then
make TCVERSION=${GH_ARCH##*-} ARCH=${GH_ARCH%%-*} publish -C spk/${GH_PACKAGE}
fi
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
env:
# https://github.com/SynoCommunity/spksrc/wiki/Compile-and-build-rules
GH_ARCH: ${{ matrix.arch }}
# API_KEY: ${{ secrets.PUBLISH_API_KEY }}
API_KEY: ${{ secrets.PUBLISH_API_KEY }}
BUILD_ERROR_FILE: /github/workspace/build_errors.txt
BUILD_UNSUPPORTED_FILE: /github/workspace/build_unsupported.txt
BUILD_SUCCESS_FILE: /github/workspace/build_success.txt
Expand All @@ -109,7 +109,9 @@ jobs:
release:
needs: build
name: Release
if: startsWith(github.ref, 'refs/tags/')
## Build a github release on a git tag with the format 'packagename-version'
## But don't make a github release when the PUBLISH_API_KEY is set.
if: startsWith(github.ref, 'refs/tags/') && secrets.PUBLISH_API_KEY == ''
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
Expand Down

0 comments on commit 1bc9cfa

Please sign in to comment.