-
Notifications
You must be signed in to change notification settings - Fork 24
61 lines (61 loc) · 1.69 KB
/
release.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release_Workflow
on:
push:
branches:
- master
jobs:
Code_Analysis_Job:
runs-on: ubuntu-latest
environment: test
steps:
-
name: Check out repository code
uses: actions/checkout@v4
-
name: Setup Python environment
uses: actions/setup-python@v5
-
name: Install Dependencies
run: pip install requests
-
name: Running acceptace test
run: python test.py
env:
ULTRADNS_UNIT_TEST_USERNAME: ${{ secrets.ULTRADNS_UNIT_TEST_USERNAME }}
ULTRADNS_UNIT_TEST_PASSWORD: ${{ secrets.ULTRADNS_UNIT_TEST_PASSWORD }}
ULTRADNS_UNIT_TEST_HOST_URL: ${{ secrets.ULTRADNS_UNIT_TEST_HOST_URL }}
Release_Job:
runs-on: ubuntu-latest
needs: Code_Analysis_Job
environment: prod
steps:
-
name: Check out repository code
uses: actions/checkout@v4
-
name: Setup Python environment
uses: actions/setup-python@v5
-
name: Create Release Info
run: echo "RELEASE_VERSION=$(cat .plugin-version)" >> $GITHUB_ENV
-
name: Installing Dependencies
run: |
pip install requests
pip install hatch
-
name: Versioning the build
run: hatch version ${{ env.RELEASE_VERSION }}
-
name: Creating python Package
run: hatch build
-
name: create release Tag
run: |
git tag ${{ env.RELEASE_VERSION }}
git push origin ${{ env.RELEASE_VERSION }}
-
name: Publishing python Package
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}