Skip to content

MNT: Use hash for Action workflow versions and update, and add dependabot, if needed #158

MNT: Use hash for Action workflow versions and update, and add dependabot, if needed

MNT: Use hash for Action workflow versions and update, and add dependabot, if needed #158

Workflow file for this run

name: build
on:
release:
types: [ released ]
pull_request:
workflow_dispatch:
defaults:
run:
shell: micromamba-shell {0}
jobs:
build:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }}
secrets:
pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}
freeze:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
[ "ubuntu-latest", "macos-latest" ]
python-version:
[ "3.11", "3.12" ]
fail-fast: false
name: freeze versions (Python ${{ matrix.python-version }}, ${{ matrix.os }})
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0
with:
environment-name: jwql-${{ runner.os }}-py${{ matrix.python-version }}
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}
conda
init-shell: none
generate-run-shell: true
- run: pip install .
- run: pip list
- id: version
uses: mtkennerly/dunamai-action@9cd4531c0025990c4b81719270f328f459834d12 # v1.3.0
with:
args: --strict --pattern "default-unprefixed" --style semver
- id: filename
run: echo "filename=jwql_${{ steps.version.outputs.version }}_conda_${{ runner.os }}_${{ runner.arch }}_py${{ matrix.python-version }}.yml" >> $GITHUB_OUTPUT
- run: conda env export --no-build | grep -v "name:" | grep -v "prefix:" > ${{ steps.filename.outputs.filename }}
- run: cat ${{ steps.filename.outputs.filename }}
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ steps.filename.outputs.filename }}
path: ${{ steps.filename.outputs.filename }}
- if: (github.event_name == 'release' && github.event.action == 'released')
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0
with:
file: ${{ steps.filename.outputs.filename }}