|
1 |
| -# name: deploy-and-release |
| 1 | +# name: Upload Python Package |
| 2 | + |
2 | 3 | # on:
|
3 |
| -# push: |
4 |
| -# tags: |
5 |
| -# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 |
| 4 | +# release: |
| 5 | +# types: [published] |
| 6 | + |
| 7 | +# permissions: |
| 8 | +# contents: read |
6 | 9 |
|
7 | 10 | # jobs:
|
8 | 11 | # deploy:
|
|
13 | 16 | # uses: actions/setup-python@v4
|
14 | 17 | # with:
|
15 | 18 | # python-version: '3.x'
|
16 |
| -# - name: Get the version (git tag) |
17 |
| -# id: get_version |
18 |
| -# run: | |
19 |
| -# echo ${GITHUB_REF/refs\/tags\/v/} |
20 |
| -# echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} |
21 | 19 | # - name: Install dependencies
|
22 | 20 | # run: |
|
23 | 21 | # python -m pip install --upgrade pip
|
24 |
| -# pip install setuptools wheel |
25 |
| -# - name: Build |
26 |
| -# run: | |
27 |
| -# python setup.py sdist bdist_wheel |
28 |
| -# - name: Create Release |
29 |
| -# id: create_release |
30 |
| - |
31 |
| -# env: |
32 |
| -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
33 |
| -# with: |
34 |
| -# tag_name: ${{ github.ref }} |
35 |
| -# release_name: Release ${{ github.ref }} |
36 |
| -# draft: false |
37 |
| -# prerelease: false |
38 |
| -# - name: Upload Release Asset (Wheel) |
39 |
| -# id: upload-release-asset-whl |
40 |
| - |
41 |
| -# env: |
42 |
| -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
43 |
| -# with: |
44 |
| -# upload_url: ${{ steps.create_release.outputs.upload_url }} |
45 |
| -# asset_path: ./dist/recordlinkage-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl |
46 |
| -# asset_name: recordlinkage-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl |
47 |
| -# asset_content_type: application/x-wheel+zip |
48 |
| -# - name: Upload Release Asset (Sdist) |
49 |
| -# id: upload-release-asset-sdist |
50 |
| - |
51 |
| -# env: |
52 |
| -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
53 |
| -# with: |
54 |
| -# upload_url: ${{ steps.create_release.outputs.upload_url }} |
55 |
| -# asset_path: ./dist/recordlinkage-${{ steps.get_version.outputs.VERSION }}.tar.gz |
56 |
| -# asset_name: recordlinkage-${{ steps.get_version.outputs.VERSION }}.tar.gz |
57 |
| -# asset_content_type: application/zip |
| 22 | +# pip install build |
| 23 | +# - name: Build package |
| 24 | +# run: python -m build |
58 | 25 | # - name: Publish package
|
59 |
| -# uses: pypa/gh-action-pypi-publish@master |
| 26 | +# uses: pypa/gh-action-pypi-publish@release/v1 |
60 | 27 | # with:
|
61 | 28 | # user: __token__
|
62 | 29 | # password: ${{ secrets.pypi_password }}
|
0 commit comments