|
5 | 5 | types: [released, prereleased] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - build: |
| 8 | + publish: |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 |
|
| 11 | + permissions: |
| 12 | + id-token: write # required to push with trusted-pypi-token |
| 13 | + contents: wirte #required to push |
| 14 | + |
| 15 | + env: |
| 16 | + BRANCH: ${{ github.event.release.target_commitish }} |
| 17 | + |
11 | 18 | steps: |
12 | 19 | - uses: actions/checkout@v4 |
13 | 20 | with: |
@@ -47,69 +54,13 @@ jobs: |
47 | 54 |
|
48 | 55 | - name: List contents of wheel |
49 | 56 | run: python -m zipfile --list dist/servicex_analysis_utils-*.whl |
50 | | - |
51 | | - - name: Upload an artifact of dist |
52 | | - uses: actions/upload-artifact@v4 |
53 | | - with: |
54 | | - name: dist-gha-artifact |
55 | | - path: dist |
56 | | - |
57 | | - publish: |
58 | | - needs: build |
59 | | - runs-on: ubuntu-latest |
60 | | - |
61 | | - permissions: |
62 | | - id-token: write # required to push with trusted-pypi-token |
63 | | - |
64 | | - env: |
65 | | - BRANCH: ${{ github.event.release.target_commitish }} |
66 | 57 |
|
67 | | - steps: |
68 | | - - name: Set up Python 3.12 |
69 | | - uses: actions/setup-python@v5 |
70 | | - with: |
71 | | - python-version: '3.12' |
72 | | - |
73 | | - - name: Download artifact |
74 | | - uses: actions/download-artifact@v4 |
75 | | - with: |
76 | | - name: dist-gha-artifact |
77 | | - path: dist |
78 | | - |
79 | 58 | - name: Publish distribution |
80 | 59 | |
81 | 60 | with: |
82 | 61 | print-hash: true |
83 | | - |
84 | | - commit-version-bump: |
85 | | - needs: |
86 | | - - build |
87 | | - - publish |
88 | | - runs-on: ubuntu-latest |
89 | | - permissions: |
90 | | - contents: write # required to push with GITHUB_TOKEN |
91 | | - |
92 | | - steps: |
93 | | - - name: Checkout release target branch |
94 | | - uses: actions/checkout@v4 |
95 | | - with: |
96 | | - ref: $BRANCH |
97 | | - |
98 | | - - name: Set up Python 3.12 |
99 | | - uses: actions/setup-python@v5 |
100 | | - with: |
101 | | - python-version: '3.12' |
102 | | - |
103 | | - - name: Set env |
104 | | - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
105 | | - |
106 | | - - name: Update version to commit |
107 | | - run: | |
108 | | - sed -i 's/^version\s*=\s*".*"/version = "${{ env.RELEASE_VERSION }}"/' pyproject.toml |
109 | | - sed -i '/__version__/ s/__version__\s*=.*/__version__ = "${{ env.RELEASE_VERSION }}"/' servicex_analysis_utils/__init__.py |
110 | | -
|
111 | 62 |
|
112 | | - - name: Commit version change |
| 63 | + - name: Commit version change to branch |
113 | 64 | run: | |
114 | 65 | git config --local user.name "github-actions[bot]" |
115 | 66 | git config --local user.email "github-actions[bot]@users.noreply.github.com" |
|
0 commit comments