Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-Shen committed Feb 5, 2024
1 parent 4621da6 commit 5009a7d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ jobs:
with:
submodules: recursive

- name: Get next version
id: get-next-version
run: |
echo "NEXT_VERSION=$(echo "${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}")" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -62,12 +67,12 @@ jobs:
- name: Set test pip url
if: ${{ github.ref_name == 'alpha' }}
run: |
echo "PYPI_URL=https://test.pypi.org/project/labelu/${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}" >> $GITHUB_ENV
echo "PYPI_URL=https://test.pypi.org/project/labelu/${{ env.NEXT_VERSION }}" >> $GITHUB_ENV
- name: Set release pip url
if: ${{ github.ref_name == 'main' }}
run: |
echo "PYPI_URL=https://pypi.org/project/labelu/${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}" >> $GITHUB_ENV
echo "PYPI_URL=https://pypi.org/project/labelu/${{ env.NEXT_VERSION }}" >> $GITHUB_ENV
- name: Show pypi url
run: |
Expand All @@ -77,7 +82,7 @@ jobs:
uses: satackey/[email protected]
id: InjectBackend
env:
NEXT_VERSION: ${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}
NEXT_VERSION: ${{ env.NEXT_VERSION }}
with:
required-packages: '@iarna/toml'
script: |
Expand Down Expand Up @@ -141,7 +146,7 @@ jobs:
- name: Commit version change
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: Upgrade to v${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }} [skip ci]'
commit_message: 'chore: Upgrade to v${{ env.NEXT_VERSION }} [skip ci]'
file_pattern: pyproject.toml

- name: Publish to TestPyPi
Expand Down Expand Up @@ -180,4 +185,4 @@ jobs:
with:
url: ${{ secrets.WEBHOOK_URL }}
headers: '{"Content-Type": "application/json"}'
body: '{"msgtype":"markdown","markdown":{"content":"${{ needs.prepare.steps.dry-run.outputs.RELEASE_NOTES }}${{ env.CHANGELOG }}Check it out now \ud83d\udc49\ud83c\udffb [v${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}](${{ env.PYPI_URL }})"}}'
body: '{"msgtype":"markdown","markdown":{"content":"${{ needs.prepare.steps.dry-run.outputs.RELEASE_NOTES }}${{ env.CHANGELOG }}Check it out now \ud83d\udc49\ud83c\udffb [v${{ env.NEXT_VERSION }}](${{ env.PYPI_URL }})"}}'

0 comments on commit 5009a7d

Please sign in to comment.