-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.66 KB
/
release.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Semantic Release
on:
workflow_dispatch:
inputs:
releaseType:
description: "version update type"
required: true
type: choice
default: "automatic"
options:
- "automatic"
- "major"
- "minor"
- "patch"
env:
CUDA_HOME: "/usr" # nvcc is not required, but CUDAExtension needs that env
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
environment:
name: pypi
url: https://test.pypi.org/project/ds-splat
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Python Semantic Release Manual
id: release_manual
if: ${{ github.event.inputs.releaseType != 'automatic' }}
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: ${{ github.event.inputs.releaseType }}
changelog: false
- name: Python Semantic Release Automatic
id: release_automatic
if: ${{ github.event.inputs.releaseType == 'automatic' }}
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog: false
env:
CUDA_HOME: "/usr" # nvcc is not required, but CUDAExtension needs that env
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release_manual.outputs.released == 'true' || steps.release_automatic.outputs.released == 'true'