-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (44 loc) · 1.35 KB
/
publish_to_pypi.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
name: Publish earthdata-varinfo to PyPI
on:
push:
branches: [ main ]
paths: VERSION
workflow_dispatch:
jobs:
run_tests:
uses: ./.github/workflows/run_tests.yml
publish_to_pypi:
needs: run_tests
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
id-token: write
strategy:
fail-fast: false
steps:
- name: Checkout earthdata-varinfo repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Extract semantic version number
run: echo "semantic_version=$(cat VERSION)" >> $GITHUB_ENV
- name: Extract release version notes
run: |
version_release_notes=$(./bin/extract-release-notes.sh)
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "${version_release_notes}" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Build earthdata-varinfo release
run: make build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish GitHub release
uses: ncipollo/release-action@v1
with:
body: ${{ env.RELEASE_NOTES }}
commit: main
name: Version ${{ env.semantic_version }}
tag: ${{ env.semantic_version }}