-
Notifications
You must be signed in to change notification settings - Fork 34
50 lines (42 loc) · 1.41 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (42 loc) · 1.41 KB
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
# Copyright (c) 2026 Santander Group
# SPDX-License-Identifier: Apache-2.0
#
# Release packaging. On a published GitHub Release this workflow builds the
# sdist + wheel and attaches them to the release as downloadable assets.
name: Release
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build + attach distributions
runs-on: ubuntu-latest
permissions:
contents: write # required to upload the release assets
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Build sdist + wheel
run: |
set -euo pipefail
python -m pip install --upgrade pip build
python -m build
(cd dist && for f in *; do sha256sum "$f" > "$f.sha256"; done)
ls -l dist
- name: Upload distributions as workflow artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist
path: dist/
- name: Attach distributions to the GitHub Release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "${GITHUB_REF_NAME}" dist/* --clobber