Skip to content

Fix hatch vcs versioning, overhaul fingerprint hashing, use fingerpri… #98

Fix hatch vcs versioning, overhaul fingerprint hashing, use fingerpri…

Fix hatch vcs versioning, overhaul fingerprint hashing, use fingerpri… #98

Workflow file for this run

name: Publish
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
branches:
- "main"
jobs:
build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Build release
run: pixi run --manifest-path pixi.toml build-release
- name: Upload conda channel
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: |
/tmp/ecoscope-workflows/release/artifacts/
!/tmp/ecoscope-workflows/release/artifacts/bld
!/tmp/ecoscope-workflows/release/artifacts/src_cache
if-no-files-found: error
compression-level: 0
verify-build-tag:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Verify
run: pixi run --manifest-path pixi.toml -e default verify-build-tag ${{ github.ref_name }}
publish-to-prefix:
needs:
- build-release
- verify-build-tag
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Download conda channel
uses: actions/download-artifact@v4
with:
name: release-artifacts
path: /tmp/ecoscope-workflows/release/artifacts
- name: Log conda channel contents
run: ls -lR /tmp/ecoscope-workflows/release/artifacts
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Publish to prefix.dev
env:
PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }}
run: pixi run --manifest-path pixi.toml -e default push-all
github-release:
needs:
- publish-to-prefix
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Download conda channel
uses: actions/download-artifact@v4
with:
name: release-artifacts
path: /tmp/ecoscope-workflows/release/artifacts
- name: Log conda channel contents
run: ls -lR /tmp/ecoscope-workflows/release/artifacts
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.ECOSCOPE_ELEBOT_PAT }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--generate-notes
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.ECOSCOPE_ELEBOT_PAT }}
run: >-
gh release upload
'${{ github.ref_name }}'
/tmp/ecoscope-workflows/release/artifacts/noarch/**
--repo '${{ github.repository }}'