-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (42 loc) · 1.35 KB
/
release.yml
File metadata and controls
44 lines (42 loc) · 1.35 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
name: Release
on:
push:
tags:
- '*'
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Poetry
run: pip install poetry
- name: Build package
run: poetry build
- name: Get the version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Create Release ${{ github.ref }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
release_name: ${{ steps.get_version.outputs.version }}
# body: # TODO Read this from the CHANGELOG
draft: false
prerelease: false
- name: Upload packages
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/citc-${{ steps.get_version.outputs.version }}-py3-none-any.whl
asset_name: citc-${{ steps.get_version.outputs.version }}-py3-none-any.whl
asset_content_type: application/zip