Skip to content

add publish.yml (#291) #1

add publish.yml (#291)

add publish.yml (#291) #1

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"
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
github-release:
needs:
- build

Check failure on line 33 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 33, Col: 9): Job 'github-release' depends on unknown job 'build'. .github/workflows/publish.yml (Line: 68, Col: 9): Job 'publish-to-prefix' depends on unknown job 'build'.
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: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--generate-notes
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload
'${{ github.ref_name }}'
/tmp/ecoscope-workflows/release/artifacts/noarch/**
--repo '${{ github.repository }}'
publish-to-prefix:
needs:
- build
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: Publish to prefix.dev
env:
PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }}
run: |
chmod +x ./publish/push.sh
./publish/push.sh