-
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (50 loc) · 1.53 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
62
name: Release
on:
workflow_dispatch:
inputs:
package:
description: 'Package to release, or "all" to release all packages'
required: true
default: 'all'
type: choice
options:
- all
- main
- shims
jobs:
release-pypi:
name: release-pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Get version
id: get_version
run: |
echo "VERSION=$(python .github/scripts/get_version.py)" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: 'v${{ steps.get_version.outputs.VERSION }}'
tag_name: 'v${{ steps.get_version.outputs.VERSION }}'
- name: Pull tags
run: git pull --tags
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Build main
if: github.event.inputs.package == 'all' || github.event.inputs.package == 'main'
run: pipx run build
- name: Build shims
if: github.event.inputs.package == 'all' || github.event.inputs.package == 'shims'
run: pipx run build -C mina-target=shims
- name: Upload to Pypi
run: |
pipx run twine upload --username __token__ --password ${{ secrets.PYPI_TOKEN }} dist/*