-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.16 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
name: Release
on:
push:
tags:
- '*'
jobs:
build-and-release:
name: release
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: actions/setup-go@v5
with:
go-version: '>=1.19.1'
- name: Dependencies
run: |
apt-get update && apt-get --assume-yes install build-essential
python -m pip install --upgrade pontos
- name: Prepare
run: |
make prepare-release
- name: Changelog
id: prepare_changelog
run: |
pontos-changelog || (git log --oneline | grep "Add" | sed "s/.*Add[: ]*/* /" > .changelog.md)
[ ! -f ".changelog.md" ] && tail -n +7 changelog/*.md | head -n -2 | sed 's/##/#/' > .changelog.md
echo "::set-output name=RELEASE_BODY::$(cat .changelog.md)"
- name: Upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
body: |
${{ steps.prepare_changelog.outputs.RELEASE_BODY }}