Skip to content

chore: update release process for new branching strat #64

chore: update release process for new branching strat

chore: update release process for new branching strat #64

Workflow file for this run

name: Create Binaries

Check failure on line 1 in .github/workflows/binaries.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/binaries.yml

Invalid workflow file

you may only define one of `branches` and `branches-ignore` for a single event
on:
push:
branches:
- "main"
- "release/**"
- "pre-releases/**"
branches-ignore:
- "release/v1"
jobs:
build:
if: startsWith(github.event.head_commit.message, 'Copernicus Marine Release')
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, macos-13]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0'
micromamba-binary-path: ${{ runner.temp }}/bin/micromamba
environment-file: conda_environment_binary.yaml
environment-name: copernicusmarine-binary
condarc-file: .condarc
cache-environment: true
post-cleanup: 'all'
- name: Build with PyInstaller
shell: micromamba-shell {0}
run: |
make run-using-pyinstaller-${{ matrix.os }}
- name: Set VERSION environment variable
id: set-version
shell: micromamba-shell {0}
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_OUTPUT
- name: Upload binaries to macos or ubuntu
shell: micromamba-shell {0}
env:
GH_TOKEN: ${{ github.token }}
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
ARCH="macos-arm64"
elif [ "${{ matrix.os }}" == "macos-13" ]; then
ARCH="macos-x86_64"
elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
ARCH="linux"
fi
gh release upload v${{steps.set-version.outputs.VERSION}} dist/copernicusmarine_${ARCH}.cli#copernicusmarine-binary-${ARCH}-for-v${{steps.set-version.outputs.VERSION}}