Skip to content

Commit 2bb6548

Browse files
committed
debugging conda workflow
1 parent f2d5725 commit 2bb6548

File tree

2 files changed

+49
-21
lines changed

2 files changed

+49
-21
lines changed

.github/workflows/create-release.yml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,6 @@ jobs:
7070
env:
7171
REPO: ${{ github.repository }}
7272

73-
- name: Create Tag
74-
run: |
75-
set -x
76-
77-
git tag "conda-${{ needs.version_check.outputs.PCAPKIT_VERSION }}+0" -m"Conda Build"
78-
79-
- name: Push Changes
80-
uses: ad-m/github-push-action@master
81-
with:
82-
github_token: ${{ secrets.GITHUB_TOKEN }}
83-
tags: true
84-
8573
- name: Create Release
8674
id: create_release
8775
uses: ncipollo/release-action@v1.12.0
@@ -101,6 +89,32 @@ jobs:
10189
tag: "v${{ needs.version_check.outputs.PCAPKIT_VERSION }}"
10290
token: "${{ secrets.GITHUB_TOKEN }}"
10391

92+
tag:
93+
name: Conda Tag
94+
runs-on: ubuntu-latest
95+
needs: [ version_check ]
96+
if: ${{ startsWith(github.ref_name, 'v') || needs.version_check.outputs.PCAPKIT_TAG_EXISTS == 'false' }}
97+
steps:
98+
- name: Checkout code
99+
uses: actions/checkout@v3
100+
with:
101+
ref: v${{ needs.version_check.outputs.PCAPKIT_VERSION }}
102+
fetch-depth: 0
103+
104+
- name: Create Tag
105+
run: |
106+
set -x
107+
108+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
109+
git config --local user.name "github-actions[bot]"
110+
git tag "conda-${{ needs.version_check.outputs.PCAPKIT_VERSION }}+0" -m"Conda Build"
111+
112+
- name: Push Changes
113+
uses: ad-m/github-push-action@master
114+
with:
115+
github_token: ${{ secrets.GITHUB_TOKEN }}
116+
tags: true
117+
104118
pypi:
105119
name: PyPI distribution for Python ${{ matrix.python-version }}
106120
runs-on: ubuntu-latest
@@ -174,7 +188,7 @@ jobs:
174188
conda:
175189
name: Conda deployment of package with Python ${{ matrix.python-version }}
176190
runs-on: ubuntu-latest
177-
needs: [ github, version_check ]
191+
needs: [ tag, github, version_check ]
178192
if: ${{ startsWith(github.ref_name, 'v') || needs.version_check.outputs.PCAPKIT_TAG_EXISTS == 'false' }}
179193
strategy:
180194
matrix:

.github/workflows/cron-conda.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,41 @@ jobs:
9999
echo "PCAPKIT_CONDA_LABEL=$(python -c 'import pcapkit, pkg_resources; print("dev" if pkg_resources.parse_version(pcapkit.__version__).is_prerelease else "main")')" >> $GITHUB_OUTPUT
100100
echo "PCAPKIT_BUILD=$(cat conda/build)" >> $GITHUB_OUTPUT
101101
102+
outputs:
103+
CONDA_CHANGED: ${{ steps.verify-changed-files.outputs.files_changed }}
104+
PCAPKIT_VERSION: ${{ steps.get_version.outputs.PCAPKIT_VERSION }}
105+
PCAPKIT_CONDA_LABEL: ${{ steps.get_version.outputs.PCAPKIT_CONDA_LABEL }}
106+
PCAPKIT_BUILD: ${{ steps.get_version.outputs.PCAPKIT_BUILD }}
107+
108+
conda-tag:
109+
name: Conda Tag
110+
runs-on: ubuntu-latest
111+
needs: [ conda-update ]
112+
if: needs.conda-update.outputs.CONDA_CHANGED == 'true'
113+
steps:
114+
- name: Checkout code
115+
uses: actions/checkout@v3
116+
with:
117+
ref: v${{ needs.conda-update.outputs.PCAPKIT_VERSION }}
118+
fetch-depth: 0
119+
102120
- name: Create Tag
103121
run: |
104122
set -x
105123
106-
git tag "conda-${{ steps.get_version.outputs.PCAPKIT_VERSION }}+${{ steps.get_version.outputs.PCAPKIT_BUILD }}" -m"Conda Build"
124+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
125+
git config --local user.name "github-actions[bot]"
126+
git tag "conda-${{ needs.conda-update.outputs.PCAPKIT_VERSION }}+0" -m"Conda Build"
107127
108128
- name: Push Changes
109129
uses: ad-m/github-push-action@master
110130
with:
111131
github_token: ${{ secrets.GITHUB_TOKEN }}
112132
tags: true
113133

114-
outputs:
115-
CONDA_CHANGED: ${{ steps.verify-changed-files.outputs.files_changed }}
116-
PCAPKIT_VERSION: ${{ steps.get_version.outputs.PCAPKIT_VERSION }}
117-
PCAPKIT_CONDA_LABEL: ${{ steps.get_version.outputs.PCAPKIT_CONDA_LABEL }}
118-
PCAPKIT_BUILD: ${{ steps.get_version.outputs.PCAPKIT_BUILD }}
119-
120134
conda-dist:
121135
runs-on: ubuntu-latest
122-
needs: [ conda-update ]
136+
needs: [ conda-tag, conda-update ]
123137
if: needs.conda-update.outputs.CONDA_CHANGED == 'true'
124138
strategy:
125139
matrix:

0 commit comments

Comments
 (0)