-
Notifications
You must be signed in to change notification settings - Fork 18
59 lines (56 loc) · 1.62 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
54
55
56
57
58
59
name: Release
on:
push:
tags:
- 'v[0-9]*'
jobs:
test:
strategy:
matrix:
platform: [ubuntu-20.04]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.12'
architecture: 'x64'
- name: Setup poetry
run: python3 -m pip install poetry
- name: Install dependencies
run: python3 -m poetry install
- name: Build package
id: build_package
run: make package
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: packages
path: dist/${{ steps.build_package.outputs.package_filename }}
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
steps:
- name: Download
uses: actions/download-artifact@v1
with:
name: packages
- name: Get environment
id: environment
run: |
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
echo "tag_name=$(echo ${{ github.ref }} | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: ncipollo/release-action@4874428bc07f8473128b16dfb628a0bcfb6ca10d
with:
tag: ${{ steps.environment.outputs.tag_name }}
name: "Release: [${{ steps.environment.outputs.tag_name }}] - ${{ steps.environment.outputs.date }}"
artifacts: "packages/*.zip"
artifactContentType: "application/zip"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: true