Doc: EXTENSIONS.md, Cppcheck, INSTALLATION.md refactoring (#199) #82
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
name: build | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
workflow_dispatch: | |
jobs: | |
build-windows: | |
uses: ./.github/workflows/windows.yml | |
build-linux: | |
uses: ./.github/workflows/linux.yml | |
build-osx: | |
uses: ./.github/workflows/osx.yml | |
permissions: | |
actions: write | |
build-synology: | |
uses: ./.github/workflows/synology.yml | |
build-qnap: | |
uses: ./.github/workflows/qnap.yml | |
repack-qnap: | |
uses: ./.github/workflows/qnap-repack.yml | |
with: | |
external_call: true | |
needs: [build-linux] | |
permissions: | |
actions: write | |
generate-signatures: | |
env: | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
runs-on: ubuntu-latest | |
needs: [build-windows, build-linux, build-osx, build-synology, build-qnap, repack-qnap] | |
permissions: | |
actions: write | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
- name: Generate signatures | |
run: | | |
mkdir -p builds | |
mv nzbget-windows-installers/* builds || true | |
mv nzbget-linux-installers/* builds || true | |
mv nzbget-osx-installers/* builds || true | |
mv nzbget-synology-packages/* builds || true | |
mv nzbget-qnap-packages/* builds || true | |
mv nzbget-qnap-native-packages/* builds || true | |
cd builds | |
VERSION=$(ls | grep bin-windows-setup | cut -d - -f 2) | |
if [ "$GITHUB_REF_NAME" != "main" ]; then VERSION="$VERSION-testing"; fi | |
SIGS_FILE="nzbget-$VERSION.sig.txt" | |
echo "Generating $SIGS_FILE ..." | |
echo | |
echo "nzbget_signatures({" | tee $SIGS_FILE | |
echo | tee -a $SIGS_FILE | |
for FILE in *.exe *.run *.zip *.spk *.qpkg; do | |
[ -f $FILE ] || continue | |
MD5=$(openssl dgst -md5 $FILE | cut -d ' ' -f 2) | |
SHA1=$(openssl dgst -sha1 $FILE | cut -d ' ' -f 2) | |
SHA256=$(openssl dgst -rsa-sha256 $FILE | cut -d ' ' -f 2) | |
RSASHA256=$(openssl dgst -rsa-sha256 -sign <(echo "$PRIVATE_KEY") $FILE | hexdump -ve '1/1 "%.2x"') | |
echo "\"MD5($FILE)\" : \"$MD5\"," | tee -a $SIGS_FILE | |
echo "\"SHA1($FILE)\" : \"$SHA1\"," | tee -a $SIGS_FILE | |
echo "\"SHA256($FILE)\" : \"$SHA256\"," | tee -a $SIGS_FILE | |
echo "\"RSA-SHA256($FILE)\" : \"$RSASHA256\"," | tee -a $SIGS_FILE | |
echo | tee -a $SIGS_FILE | |
done | |
echo "\"\" : \"\"});" | tee -a $SIGS_FILE | |
cd .. | |
echo | |
echo "Done." | |
- name: Upload build artifacts with signatures | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nzbget-installers | |
path: builds/* | |
retention-days: 5 | |
- name: Delete unneded platform-specific artifacts | |
uses: geekyeggo/delete-artifact@v4 | |
with: | |
name: | | |
nzbget-windows-installers | |
nzbget-linux-installers | |
nzbget-osx-installers | |
nzbget-synology-packages | |
nzbget-qnap-packages | |
nzbget-qnap-native-packages | |
make-testing-release: | |
runs-on: [self-hosted, linux] | |
needs: [generate-signatures] | |
permissions: | |
contents: write | |
if: github.ref_name == 'develop' | |
steps: | |
- name: Delete tag and release | |
uses: dev-drprasad/delete-tag-and-release@v0.2.1 | |
with: | |
delete_release: true | |
tag_name: testing | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
- name: Create latest artifacts | |
run: | | |
cp $(find nzbget-installers/ -name *linux.run) nzbget-installers/nzbget-latest-testing-bin-linux.run | |
cp $(find nzbget-installers/ -name *windows-setup.exe) nzbget-installers/nzbget-latest-testing-bin-windows-setup.exe | |
- name: Make release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "nzbget-installers/*" | |
generateReleaseNotes: true | |
tag: testing | |
allowUpdates: true | |
prerelease: true | |
- name: Update website info | |
run: | | |
bash /build/update-release-info.sh |