-
-
Notifications
You must be signed in to change notification settings - Fork 600
87 lines (75 loc) · 2.55 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Create Release
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build_release:
name: build_release
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: version
run: echo "version=$(make get-version)" >> $GITHUB_OUTPUT
id: version
- name: Get Hash
id: hash
run: echo "git_hash=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT
- name: build artifacts
run: make package
- name: Create Changelog
uses: saadmk11/changelog-ci@v1.1.2
id: changelog_ci
with:
changelog_filename: CHANGELOG.md
release_version: ${{ steps.version.outputs.version }}
config_file: .github/changelogConfig.yml
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Repo Attributes
id: attrs
uses: ibnesayeed/repo-attrs@master
- name: release
uses: ncipollo/release-action@v1
id: create_release
with:
draft: false
prerelease: false
name: Leantime v${{ steps.version.outputs.version }}
tag: v${{ steps.version.outputs.version }}
generateReleaseNotes: false
makeLatest: true
body: |
## Changes in this Release
History from `${{ steps.attrs.outputs.tail }}` to `${{ steps.attrs.outputs.head }}`
### Commits
${{ steps.attrs.outputs.commits }}
### Contributors
${{ steps.attrs.outputs.contributors }}
### Files
```
${{ steps.attrs.outputs.files }}
```
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/Leantime-v${{ steps.version.outputs.version }}.zip
asset_name: Leantime-v${{ steps.version.outputs.version }}.zip
asset_content_type: application/gzip
- name: upload tar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/Leantime-v${{ steps.version.outputs.version }}.tar.gz
asset_name: Leantime-v${{ steps.version.outputs.version }}.tar.gz
asset_content_type: application/gzip