Skip to content

Commit

Permalink
try to release the data-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
anadis504 committed May 11, 2023
1 parent 4d42631 commit 44162fd
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/data-parser-release.yml
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

0 comments on commit 44162fd

Please sign in to comment.