-
Notifications
You must be signed in to change notification settings - Fork 45
40 lines (38 loc) · 1.05 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
name: Release
on:
push:
tags:
- '*'
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install build dependencies
run: python -m pip install -U hatch hatch-vcs
- name: Build
run: hatch build --clean
- name: Publish
run: hatch publish
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.HatchAuth }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Automatic Release
draft: false
prerelease: false