-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.34 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
name: Release
on:
push:
tags:
- v*
jobs:
create-release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Fetch tags
run: git fetch --prune --unshallow --tags
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@main
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py3.10
named-caches-hash: ${{ hashFiles('locks/*.lock', 'locks/tools/*.lock') }}
pants-python-version: 3.10
- name: Build Packages
run: pants package //:package
- name: "Build Changelog"
id: github_release
uses: mikepenz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configuration: ".github/release-action-config.json"
toTag: ${{ github.ref }}
- name: Release to GitHub
uses: mikepenz/[email protected]
with:
body: ${{ steps.github_release.outputs.changelog }}
prerelease: false
tag_name: ${{ github.ref }}
name: "Release ${{ github.ref_name }}"
files: |
dist/*
LICENSE-*
- name: Publish Packages to PyPi
env:
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: pants publish //:package