Ewm3645 mask workspace diffcal #429
This file contains hidden or 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: Pixi Packaging and Deployment | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| # Run on pull requests targeting any base branch | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for accurate versioning | |
| fetch-tags: true # Fetch tags to ensure versioning works correctly | |
| - uses: prefix-dev/[email protected] | |
| with: | |
| pixi-version: v0.41.4 | |
| manifest-path: pyproject.toml | |
| - name: build pypi package | |
| run: | | |
| pixi run build-pypi | |
| - name: build conda package | |
| run: | | |
| pixi run build-conda | |
| - name: upload conda package to anaconda | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| env: | |
| ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
| IS_RC: ${{ contains(github.ref, 'rc') }} | |
| run: | | |
| # label is main or rc depending on the tag-name | |
| CONDA_LABEL="main" | |
| if [ "${IS_RC}" = "true" ]; then CONDA_LABEL="rc"; fi | |
| echo pushing ${{ github.ref }} with label $CONDA_LABEL | |
| pixi run anaconda upload --label $CONDA_LABEL --user neutrons snapred-*.conda | |
| trigger-deploy: | |
| runs-on: ubuntu-latest | |
| needs: [linux] | |
| # only trigger deploys from protected branches and tags | |
| if: ${{github.ref_protected || github.ref_type == 'tag' }} | |
| steps: | |
| - name: Determine Environment | |
| uses: neutrons/branch-mapper@v2 | |
| id: conda_env_name | |
| with: | |
| prefix: snapred | |
| - name: Trigger deploy | |
| id: trigger | |
| uses: eic/trigger-gitlab-ci@v3 | |
| with: | |
| url: https://code.ornl.gov | |
| token: ${{ secrets.GITLAB_TRIGGER_TOKEN }} | |
| ref_name: main | |
| project_id: 7835 | |
| variables: | | |
| PLAY="update" | |
| CONDA_ENV="${{ steps.conda_env_name.outputs.name }}" |