diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..e2dd461 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,9 @@ +# Exclude bot PRs from auto-generated release notes +changelog: + exclude: + labels: + - ignore-for-release + authors: + - dependabot + - dependabot[bot] + - pre-commit-ci[bot] diff --git a/.github/workflows/test_and_deploy.yaml b/.github/workflows/test_and_deploy.yaml index 67bee23..259855c 100644 --- a/.github/workflows/test_and_deploy.yaml +++ b/.github/workflows/test_and_deploy.yaml @@ -89,7 +89,7 @@ jobs: cp *.conda /tmp/local-channel/linux-64 - name: Verify conda package - uses: neutrons/conda-verify@main + uses: neutrons/conda-actions/pkg-verify@main with: package-name: ${{ env.PKG_NAME }} module-name: ${{ env.MODULE_NAME }} @@ -105,7 +105,7 @@ jobs: name: Upload package to anaconda runs-on: ubuntu-latest needs: [tests, conda-build] - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/next' steps: - name: Checkout uses: actions/checkout@v6 @@ -132,15 +132,21 @@ jobs: name: artifact-conda-package - name: Upload package to anaconda - 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 ${{ env.PKG_NAME }}-*.conda + uses: neutrons/conda-actions/publish@main + with: + anaconda-token: ${{ secrets.ANACONDA_TOKEN }} + organization: neutrons + package-path: ${{ env.PKG_NAME }}-*.conda + + - name: Remove old packages + if: github.ref == 'refs/heads/next' + uses: neutrons/conda-actions/pkg-remove@v1 + with: + anaconda_token: ${{ secrets.ANACONDA_TOKEN }} + organization: neutrons + package_name: ${{ env.PKG_NAME }} + label: ${{ env.CONDA_LABEL }} + keep: 5 pypi-publish: name: Upload release to PyPI