-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
84 additions
and
0 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,84 @@ | ||
name: Parser-Release | ||
|
||
on: | ||
push: | ||
branches: [ "parser-release" ] | ||
pull_request: | ||
branches: [ "parser-release" ] | ||
|
||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10"] | ||
poetry-version: ["1.4.2"] | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Change wd | ||
run: cd data-parser | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run image | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: View poetry --help | ||
run: poetry --help | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: install pyinstaller | ||
run: poetry run pip install -U pyinstaller | ||
- name: Build execution file | ||
run: poetry run pyinstaller main.py --onefile | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: rename built binary | ||
run: poetry run mv ./dist/main ./dist/main-${{ matrix.os }} | ||
|
||
- name: Store built binary | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: parser-binary | ||
path: ./dist | ||
retention-days: 5 | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Change wd | ||
run: cd data-parser | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Download built binary | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: parser-binary | ||
path: dist | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ./dist/* | ||
name: parser-binary | ||
tag_name: release | ||
permissions: | ||
contents: write | ||
|
||
# upload artifact instead, new job between for release once artifacts uploaded | ||
# use som downloadartifact command |