Skip to content

Commit bdc5d24

Browse files
Dev build naming and tag action fix (#2195)
#### Reference Issues/PRs <!--Example: Fixes #1234. See also #3456.--> #### What does this implement or fix? * Pypi doesn't allow sha to be part of the naming so removing it and instead incrementing `dev` number. `5.2.5.dev0` `5.2.5dev1` etc * Release from release branch action wasn't working because tag action wasn't set up correctly. Proof of working: https://github.com/man-group/ArcticDB/actions/workflows/automated_release.full_version_cron.yml ## Change Type (Required) - [x] **Patch** (Bug fix or non-breaking improvement) - [ ] **Minor** (New feature, but backward compatible) - [ ] **Major** (Breaking changes) - [ ] **Cherry pick** #### Any other comments? #### Checklist <details> <summary> Checklist for code changes... </summary> - [ ] Have you updated the relevant docstrings, documentation and copyright notice? - [ ] Is this contribution tested against [all ArcticDB's features](../docs/mkdocs/docs/technical/contributing.md)? - [ ] Do all exceptions introduced raise appropriate [error messages](https://docs.arcticdb.io/error_messages/)? - [ ] Are API changes highlighted in the PR description? - [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes? </details> <!-- Thanks for contributing a Pull Request to ArcticDB! Please ensure you have taken a look at: - ArcticDB's Code of Conduct: https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md - ArcticDB's Contribution Licensing: https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing -->
1 parent 71ebe0b commit bdc5d24

3 files changed

+35
-5
lines changed

.github/workflows/automated_release.create_developmental_release.yml

+32-4
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,43 @@ jobs:
2727
with:
2828
regex: ^v\d+\.\d+\.\d+rc\d+$
2929
from_branch: ${{ needs.get-master-sha.outputs.sha }}
30-
30+
31+
get-dev-number:
32+
name: Get dev number
33+
needs: calculate-next-version
34+
runs-on: ubuntu-latest
35+
outputs:
36+
next_dev_number: ${{ steps.next-number.outputs.next_dev_number }}
37+
steps:
38+
- name: Get latest dev tag
39+
id: latest_tag
40+
uses: oprypin/find-latest-tag@v1
41+
with:
42+
repository: ${{ github.repository }}
43+
prefix: v${{ needs.calculate-next-version.outputs.version }}.dev
44+
sort-tags: true
45+
continue-on-error: true
46+
47+
- name: Calculate next dev number
48+
id: next-number
49+
run: |
50+
if [ -z "${{ steps.latest_tag.outputs.tag }}" ]; then
51+
next_dev_number=0
52+
else
53+
LATEST_TAG="${{ steps.latest_tag.outputs.tag }}"
54+
LATEST_TAG="${LATEST_TAG#v${{ needs.calculate-next-version.outputs.version }}.dev}"
55+
next_dev_number=$((LATEST_TAG + 1))
56+
fi
57+
echo "next_dev_number=$next_dev_number" >> $GITHUB_OUTPUT
58+
3159
rc_release:
32-
name: Tag and Release version ${{ needs.calculate-next-version.outputs.version }}.dev0+${{ needs.get-master-sha.outputs.sha }} from branch master(${{ needs.get-master-sha.outputs.sha }})
60+
name: Tag and Release version ${{ needs.calculate-next-version.outputs.version }}.dev${{ needs.get-dev-number.outputs.next_dev_number }} from branch master(${{ needs.get-master-sha.outputs.sha }})
3361
secrets: inherit
3462
permissions:
3563
checks: read
3664
contents: write
3765
uses: ./.github/workflows/tag.yml
38-
needs: [calculate-next-version, get-master-sha]
66+
needs: [calculate-next-version, get-master-sha, get-dev-number]
3967
with:
40-
version: ${{ needs.calculate-next-version.outputs.version }}.dev0+${{ needs.get-master-sha.outputs.sha }}
68+
version: ${{ needs.calculate-next-version.outputs.version }}.dev${{ needs.get-dev-number.outputs.next_dev_number }}
4169
from_branch: master

.github/workflows/automated_release.create_release_branch.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: "Automated Release: Create next release branch"
33
on:
44
release:
55
types: [released]
6-
run-name: "Automated release: ${{ github.event.release.tag_name }} released. Cutting the branch for the next version"
6+
workflow_dispatch:
7+
78
jobs:
89
get-master-sha:
910
name: Get master sha

.github/workflows/tag.yml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
uses: actions/[email protected]
4646
with:
4747
token: ${{secrets.TAGGING_TOKEN}}
48+
ref: ${{ env.FROM_BRANCH }}
4849

4950
- name: Tag required version
5051
run: |

0 commit comments

Comments
 (0)