-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix binary build process & add tests.
- Loading branch information
1 parent
e07296e
commit 6ac9129
Showing
3 changed files
with
52 additions
and
27 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 |
---|---|---|
|
@@ -21,12 +21,15 @@ jobs: | |
- os: windows-latest | ||
artifact: RMD-windows.exe | ||
path: ./dist/RedditDownloader.exe | ||
run_test: ./dist/RedditDownloader.exe --skip_update --run_tests=* | ||
- os: ubuntu-16.04 | ||
artifact: RMD-ubuntu | ||
path: ./dist/RedditDownloader | ||
run_test: chmod +x ./dist/RedditDownloader && ./dist/RedditDownloader --skip_update --run_tests=* | ||
- os: macOS-latest | ||
artifact: RMD-macOS | ||
path: ./dist/RedditDownloader | ||
run_test: chmod +x ./dist/RedditDownloader && ./dist/RedditDownloader --skip_update --run_tests=* | ||
|
||
steps: | ||
- name: Check for Required Package Updates | ||
|
@@ -62,12 +65,22 @@ jobs: | |
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
pip install --upgrade 'setuptools>=49.1.1' | ||
- name: Build with PyInstaller | ||
if: steps.update.outputs.update_available == 'true' | ||
run: | | ||
pyinstaller build-rmd.spec | ||
- name: Run Unit Tests | ||
if: steps.update.outputs.update_available == 'true' | ||
run: | | ||
${{matrix.run_test}} | ||
env: | ||
RMD_REFRESH_TOKEN: ${{secrets.RMD_REFRESH_TOKEN}} | ||
RMD_IMGUR_ID: ${{secrets.RMD_IMGUR_ID}} | ||
RMD_IMGUR_SECRET: ${{secrets.RMD_IMGUR_SECRET}} | ||
|
||
- name: Upload binaries to release | ||
if: steps.update.outputs.update_available == 'true' | ||
uses: svenstaro/[email protected] | ||
|
@@ -79,27 +92,27 @@ jobs: | |
tag: ${{ steps.update.outputs.release_tag }} | ||
|
||
|
||
# update-release-info: | ||
# name: Update Artifact Metadata | ||
# runs-on: ubuntu-latest | ||
# needs: [publish] | ||
# steps: | ||
# - name: Build Data File | ||
# uses: shadowmoose/[email protected] | ||
# id: build | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# outFile: ./_public/release.json | ||
# owner: shadowmoose | ||
# repo: RedditDownloader | ||
update-release-info: | ||
name: Update Artifact Metadata | ||
runs-on: ubuntu-latest | ||
needs: [publish] | ||
steps: | ||
- name: Build Data File | ||
uses: shadowmoose/[email protected] | ||
id: build | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
outFile: ./_public/release.json | ||
owner: shadowmoose | ||
repo: RedditDownloader | ||
|
||
# - name: Deploy to release-metadata branch | ||
# if: steps.build.outputs.is_released == 'true' | ||
# uses: peaceiris/[email protected] | ||
# env: | ||
# ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
# PUBLISH_BRANCH: release-metadata-3.x | ||
# PUBLISH_DIR: ./_public | ||
# with: | ||
# username: "shadow-bot" | ||
# useremail: "[email protected]" | ||
- name: Deploy to release-metadata branch | ||
if: steps.build.outputs.is_released == 'true' | ||
uses: peaceiris/[email protected] | ||
env: | ||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
PUBLISH_BRANCH: release-metadata-3.x | ||
PUBLISH_DIR: ./_public | ||
with: | ||
username: "shadow-bot" | ||
useremail: "[email protected]" |
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