Merge pull request #3 from SongshGeo/dev #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release-please | |
on: | |
push: | |
branches: | |
- main | |
- master | |
permissions: | |
contents: write | |
pull-requests: write | |
id-token: write | |
jobs: | |
# 创建 release | |
release-please: | |
runs-on: ubuntu-latest | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: python # 改为 python | |
package-name: mksci-font # 改为你的包名 | |
# # 发布到 pypi | |
# publish-pypi: | |
# needs: release-please | |
# runs-on: ubuntu-latest | |
# if: ${{ needs.release-please.outputs.release_created }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.x' | |
# - name: Install poetry | |
# run: | | |
# curl -sSL https://install.python-poetry.org | python3 - | |
# - name: Configure poetry | |
# run: | | |
# poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | |
# - name: Build and publish | |
# run: | | |
# poetry build | |
# poetry publish | |
# 打包源码, 上传到 release 中 | |
# build-and-attach-assets: | |
# needs: release-please | |
# runs-on: ubuntu-latest | |
# if: ${{ needs.release-please.outputs.release_created }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Zip src folder | |
# run: zip -r src.zip src/ | |
# - name: Upload Release Asset | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# run: | | |
# gh release upload ${{ needs.release-please.outputs.tag_name }} src.zip --clobber |