-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.5 KB
/
build-and-publish.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: Build & publish artifacts
on:
push:
branches:
- "main"
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3
jobs:
build-python-package:
name: Build Python package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
# publish-python-package:
# name: Publish Python package to PyPI
# if: github.ref_type == 'tag'
# needs: ["build-python-package"]
# runs-on: ubuntu-latest
# environment: pypi
# permissions:
# id-token: write
# steps:
# - uses: actions/download-artifact@v4
# with:
# name: Packages
# path: dist
# - uses: pypa/gh-action-pypi-publish@release/v1
# if: github.event_name == 'release' && github.event.action == 'published'
# with:
# # Remember to tell (test-)pypi about this repo before publishing
# # Remove this line to publish to PyPI
# repository-url: https://test.pypi.org/legacy/
build-and-publish-docker-image:
name: "Build and publish Docker image"
needs: ["build-python-package"]
uses: "nsidc/.github/.github/workflows/build-and-publish-container-image.yml@main"
secrets: "inherit"