Update README.md #52
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 Workflow | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
architecture: 'x64' | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Set tag name from branch | |
run: | | |
TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/heads\///') | |
shell: bash | |
- name: Run PyInstaller | |
run: | | |
python -m PyInstaller pdfsplitter.spec | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Windows_pdfsplitter | |
path: dist/pdfsplitter.exe | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
with: | |
tag_name: ${{ env.BRANCH_NAME }} | |
release_name: Release ${{ env.BRANCH_NAME }} | |
body_path: README.md | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/pdfsplitter.exe | |
asset_name: pdfsplitter-amd64.exe | |
asset_content_type: application/zip |