|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | publish_alpha: |
11 | | - uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master |
| 11 | + if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' |
| 12 | + uses: OpenVoiceOS/gh-automations/.github/workflows/publish-alpha.yml@dev |
12 | 13 | secrets: inherit |
13 | 14 | with: |
14 | 15 | branch: 'dev' |
15 | 16 | version_file: 'ovos_stt_http_server/version.py' |
16 | | - setup_py: 'setup.py' |
17 | 17 | update_changelog: true |
18 | 18 | publish_prerelease: true |
| 19 | + propose_release: true |
19 | 20 | changelog_max_issues: 100 |
20 | | - |
21 | | - notify: |
22 | | - if: github.event.pull_request.merged == true |
23 | | - needs: publish_alpha |
24 | | - runs-on: ubuntu-latest |
25 | | - steps: |
26 | | - - uses: actions/checkout@v6 |
27 | | - - name: Send message to Matrix bots channel |
28 | | - id: matrix-chat-message |
29 | | - uses: fadenb/matrix-chat-message@v0.0.6 |
30 | | - with: |
31 | | - homeserver: 'matrix.org' |
32 | | - token: ${{ secrets.MATRIX_TOKEN }} |
33 | | - channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' |
34 | | - message: | |
35 | | - new ${{ github.event.repository.name }} PR merged! https://github.com/${{ github.repository }}/pull/${{ github.event.number }} |
36 | | -
|
37 | | - publish_pypi: |
38 | | - needs: publish_alpha |
39 | | - if: success() # Ensure this job only runs if the previous job succeeds |
40 | | - runs-on: ubuntu-latest |
41 | | - steps: |
42 | | - - uses: actions/checkout@v6 |
43 | | - with: |
44 | | - ref: dev |
45 | | - fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. |
46 | | - - name: Setup Python |
47 | | - uses: actions/setup-python@v6 |
48 | | - with: |
49 | | - python-version: "3.14" |
50 | | - - name: Install Build Tools |
51 | | - run: | |
52 | | - python -m pip install build wheel |
53 | | - - name: version |
54 | | - run: echo "::set-output name=version::$(python setup.py --version)" |
55 | | - id: version |
56 | | - - name: Build Distribution Packages |
57 | | - run: | |
58 | | - python setup.py sdist bdist_wheel |
59 | | - - name: Publish to PyPI |
60 | | - uses: pypa/gh-action-pypi-publish@master |
61 | | - with: |
62 | | - password: ${{secrets.PYPI_TOKEN}} |
63 | | - |
64 | | - |
65 | | - propose_release: |
66 | | - needs: publish_alpha |
67 | | - if: success() # Ensure this job only runs if the previous job succeeds |
68 | | - runs-on: ubuntu-latest |
69 | | - steps: |
70 | | - - name: Checkout dev branch |
71 | | - uses: actions/checkout@v6 |
72 | | - with: |
73 | | - ref: dev |
74 | | - |
75 | | - - name: Setup Python |
76 | | - uses: actions/setup-python@v6 |
77 | | - with: |
78 | | - python-version: '3.14' |
79 | | - |
80 | | - - name: Get version from setup.py |
81 | | - id: get_version |
82 | | - run: | |
83 | | - VERSION=$(python setup.py --version) |
84 | | - echo "VERSION=$VERSION" >> $GITHUB_ENV |
85 | | -
|
86 | | - - name: Create and push new branch |
87 | | - run: | |
88 | | - git checkout -b release-${{ env.VERSION }} |
89 | | - git push origin release-${{ env.VERSION }} |
90 | | -
|
91 | | - - name: Open Pull Request from dev to master |
92 | | - env: |
93 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
94 | | - run: | |
95 | | - # Variables |
96 | | - BRANCH_NAME="release-${{ env.VERSION }}" |
97 | | - BASE_BRANCH="master" |
98 | | - HEAD_BRANCH="release-${{ env.VERSION }}" |
99 | | - PR_TITLE="Release ${{ env.VERSION }}" |
100 | | - PR_BODY="Human review requested!" |
101 | | -
|
102 | | - # Create a PR using GitHub API |
103 | | - curl -X POST \ |
104 | | - -H "Accept: application/vnd.github+json" \ |
105 | | - -H "Authorization: token $GITHUB_TOKEN" \ |
106 | | - -d "{\"title\":\"$PR_TITLE\",\"body\":\"$PR_BODY\",\"head\":\"$HEAD_BRANCH\",\"base\":\"$BASE_BRANCH\"}" \ |
107 | | - https://api.github.com/repos/${{ github.repository }}/pulls |
| 21 | + publish_pypi: true |
| 22 | + notify_matrix: true |
108 | 23 |
|
0 commit comments