diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 29f3a60..e4cedc6 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,6 +11,7 @@ env: conda_recipe: deploy/conda/recipe conda_env_yaml: deploy/conda/env/yaml conda_env_lock: deploy/conda/env/lock + conda_org: tidywf VERSION: '0.0.3.9006' # bump jobs: @@ -34,7 +35,7 @@ jobs: - name: 🚚 Code checkout uses: actions/checkout@v6 with: - token: ${{ steps.app-token1.outputs.token }} # for overriding branch protection rules + token: ${{ steps.app-token1.outputs.token }} # branch write override persist-credentials: false - name: 👾 Miniforge setup uses: conda-incubator/setup-miniconda@v3 @@ -45,8 +46,11 @@ jobs: miniforge-version: latest - name: 🐍 Conda pkg build run: | + EXTRA_CHANNEL="" + [[ "${{ github.ref }}" == "refs/heads/dev" ]] && EXTRA_CHANNEL="--channel ${{ env.conda_org }}/label/dev" rattler-build build \ - --channel tidywf \ + ${EXTRA_CHANNEL} \ + --channel ${{ env.conda_org }} \ --channel conda-forge \ --recipe ${{ env.conda_recipe }}/recipe.yaml \ --output-dir ${RUNNER_TEMP}/out1 @@ -56,14 +60,14 @@ jobs: LABEL_ARG="" [[ "${{ github.ref }}" == "refs/heads/dev" ]] && LABEL_ARG="--channel dev" rattler-build upload anaconda \ - --owner tidywf \ + --owner ${{ env.conda_org }} \ --api-key ${{ env.anaconda_token }} \ ${LABEL_ARG} \ ${pkg_path} - name: 🔒 Conda lock run: | - CHANNEL_ARGS="--channel tidywf --channel conda-forge" - [[ "${{ github.ref }}" == "refs/heads/dev" ]] && CHANNEL_ARGS="--channel tidywf/label/dev ${CHANNEL_ARGS}" + CHANNEL_ARGS="--channel ${{ env.conda_org }} --channel conda-forge" + [[ "${{ github.ref }}" == "refs/heads/dev" ]] && CHANNEL_ARGS="--channel ${{ env.conda_org }}/label/dev ${CHANNEL_ARGS}" conda-lock lock \ --file ${{ env.conda_env_yaml }}/${{ env.pkg_name }}.yaml \ ${CHANNEL_ARGS} \ @@ -92,7 +96,6 @@ jobs: LATEST_COMMIT_HASH="$(git --no-pager log -1 --format='%H')" echo "latest_commit_hash=${LATEST_COMMIT_HASH}" >> $GITHUB_OUTPUT - name: 🔖 Create tag - if: github.ref == 'refs/heads/main' uses: actions/github-script@v8 env: LATEST_COMMIT_HASH: ${{ steps.pull_lock_commit.outputs.latest_commit_hash }} @@ -126,8 +129,8 @@ jobs: - name: 🚚 Code checkout uses: actions/checkout@v6 with: - ref: ${{ github.ref == 'refs/heads/main' && format('v{0}', env.VERSION) || '' }} # handle main/dev - token: ${{ steps.app-token2.outputs.token }} # for overriding branch protection rules + ref: v${{ env.VERSION }} + token: ${{ steps.app-token2.outputs.token }} # branch write override persist-credentials: false - name: 👾 Miniforge setup uses: conda-incubator/setup-miniconda@v3