-
Notifications
You must be signed in to change notification settings - Fork 25
43 lines (34 loc) · 1.09 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Publish
on:
release:
types: [published]
concurrency:
group: encord-active-${{ github.ref }}-publish
cancel-in-progress: true
jobs:
publish:
name: Publish Encord.Active
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.AUTOMATION_BOT_ACCESS_TOKEN }}
ref: main
- name: Setup root poetry environment
uses: ./.github/actions/setup-root-poetry-environment
- name: Poetry Version Bump
run: "poetry version ${{ github.ref_name }}"
- name: Module Version Bump
run: 'sed -i "s/__version__ = \".*\"/__version__ = \"${{ github.ref_name }}\"/g" src/encord_active/__init__.py'
- name: Version Bump commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Version bump to ${{ github.ref_name }}"
push_options: --force
- name: Build
run: poetry build
- name: Publish
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish