84 lines
3.1 KiB
YAML
84 lines
3.1 KiB
YAML
name: Release
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
jobs:
|
|
release:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- run: pip install -r requirements.txt
|
|
- run: pyinstaller --noconsole creeper.py
|
|
- run: cp -r assets dist/creeper
|
|
- name: Step 3 - Use the Upload Artifact GitHub Action
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: creeper-${{ matrix.os }}
|
|
path: dist
|
|
build-site:
|
|
needs: release
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./site
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- name: install hatch
|
|
run: pip install hatch
|
|
- name: build with markata
|
|
run: hatch run build
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: creeper-windows-latest
|
|
path: creeper-windows-latest
|
|
- uses: vimtor/action-zip@v1
|
|
with:
|
|
files: creeper-windows-latest/
|
|
dest: site/markout/creeper-windows-latest.zip
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: creeper-ubuntu-latest
|
|
path: creeper-linux-latest
|
|
- uses: vimtor/action-zip@v1
|
|
with:
|
|
files: creeper-linux-latest/
|
|
dest: site/markout/creeper-linux-latest.zip
|
|
- name: GitHub Pages
|
|
uses: crazy-max/ghaction-github-pages@v3.0.0
|
|
with:
|
|
# you can choose the target branch of your choice
|
|
target_branch: prod-markata
|
|
build_dir: site/markout
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# - 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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
# asset_path: site/markout/creeper-linux-latest.zip
|
|
# asset_name: creeper-linux-latest.zip
|
|
# asset_content_type: application/zip
|
|
# - 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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
# asset_path: site/markout/creeper-windows-latest.zip
|
|
# asset_name: creeper-windows-latest.zip
|
|
# asset_content_type: application/zip
|