-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.75 KB
/
release.yaml
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
62
63
64
65
66
67
68
69
70
name: Release
on:
workflow_dispatch:
inputs:
bumped-version-part:
description: "The version part to bump."
type: choice
options:
- major
- minor
- patch
default: "minor"
required: true
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
release:
name: Release
if: github.repository == 'famura/neuralfields'
runs-on: ubuntu-latest
permissions: # https://docs.github.com/en/actions/security-guides/automatic-token-authentication
contents: write # to publish the docs to gh-pages
env:
os: ubuntu-latest
python: "3.10"
steps:
- name: Install prerequisites
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --yes curl gcc git
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --force
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install dependencies
run: poetry install
- name: Publish to PyPI
run: |
poetry run poe release ${{ github.event.inputs.bumped-version-part }} \
--username ${{ secrets.PYPI_USER }} \
--password ${{ secrets.PYPI_TOKEN }}