new-feature: create binaries with GitHub Actions #9
Workflow file for this run
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: Create Binaries | |
on: | |
push: | |
branches: | |
- main | |
- 'pre-releases/**' | |
pull_request: | |
branches: | |
- copernicusmarine-toolbox-v2 | |
jobs: | |
build: | |
runs-on: windows-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
make build-and-prepare-for-binary | |
- name: Build with PyInstaller | |
run: | | |
make run-using-pyinstaller | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-binary | |
path: dist/copernicus_marine.exe | |
overwrite: true | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/copernicus_marine.exe | |
asset_name: windows-binary | |
tag: v2.0.0a0 | |
overwrite: true | |
body: "This is my release text. Let's see if it works." | |
- name: Gitod binary | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh release upload "v2.0.0a1" dist/copernicus_marine.exe |