Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build-release.yml #32

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build and Release

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
name: Create Release
runs-on: [ubuntu-latest]
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt
build:
needs: release
strategy:
matrix:
include:
- os: windows-latest
BUILD_CMD: poetry run pyinstaller pyinstaller/PokeTerm.spec
OUT_FILENAME: PokeTerm.exe
UP_FILENAME: PokeTerm_Windows.exe
MIME_TYPE: application/vnd.microsoft.portable-executable
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pyinstaller
poetry install
- name: Run PyInstaller
run: ${{ matrix.BUILD_CMD }}
- name: Load Release URL File from release job
uses: actions/download-artifact@v1
with:
name: release_url
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ./pyinstaller/dist/${{ matrix.OUT_FILENAME}}
asset_name: ${{ matrix.UP_FILENAME}}
asset_content_type: ${{ matrix.MIME_TYPE}}
Loading