-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·39 lines (33 loc) · 1.26 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Semantic Release
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
environment:
name: pypi
url: https://pypi.org/p/plink-bed-reader
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Python Semantic Release
id: release
uses: relekang/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# The following line is required to ensure that the package is only published to PyPI when a new version is released.
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'
- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/[email protected]
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}