-
Notifications
You must be signed in to change notification settings - Fork 8
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
4 changed files
with
94 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
|
||
name: build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: prep | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install pyinstaller==6.3.0 | ||
rm -rf build dist | ||
- name: build | ||
shell: bash | ||
run: | | ||
echo "RUNNER_OS: $RUNNER_OS" | ||
pyinstaller rsyncy.py --onefile --name rsyncy --console | ||
cat build/rsyncy/warn-rsyncy.txt | ||
cd dist; ls -l | ||
if [ "$RUNNER_OS" == "Linux" ]; then | ||
tar -czf rsyncy-linux_amd64.tar.gz rsyncy | ||
elif [ "$RUNNER_OS" == "macOS" ]; then | ||
tar -czf rsyncy-macos_amd64.tar.gz rsyncy | ||
else | ||
echo 'unknown runner' | ||
exit 1 | ||
fi | ||
- name: artifact | ||
uses: actions/upload-artifact@v4 | ||
if: runner.os == 'Linux' | ||
with: | ||
name: binary-${{ matrix.os }} | ||
path: dist/rsyncy*.tar.gz | ||
|
||
- name: artifact | ||
uses: actions/upload-artifact@v4 | ||
if: runner.os == 'macOS' | ||
with: | ||
name: binary-${{ matrix.os }} | ||
path: dist/rsyncy*.tar.gz | ||
|
||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
|
||
steps: | ||
- name: get-artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
merge-multiple: true | ||
- name: list | ||
shell: bash | ||
run: | | ||
find | ||
ls -l dist | ||
- name: publish-release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: dist/* | ||
|
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,14 @@ | ||
|
||
name: Lint | ||
name: lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- uses: psf/black@stable |
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ dist/ | |
*.egg-info/ | ||
*.pyc | ||
_* | ||
build | ||
rsyncy.spec |
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