-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.44 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (48 loc) · 1.44 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
45
46
47
48
49
50
51
52
53
name: New release
on:
push:
tags:
- "v*.*.*"
jobs:
generate-changelog:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: -vv --latest --strip header
build:
name: Publish files
runs-on: ubuntu-latest
needs: generate-changelog
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Prepare release assets
shell: bash
run: |
mkdir -p release-${{ env.CURRENT_VERSION }}/{scripts,systemd}
cp scripts/backup-flow.sh release-${{ env.CURRENT_VERSION }}/scripts/backup-flow.sh
cp -r systemd/* release-${{ env.CURRENT_VERSION }}/systemd
tar -czvf backup-flow-${{ env.CURRENT_VERSION }}.tar.gz release-${{ env.CURRENT_VERSION }}/
env:
CURRENT_VERSION: ${{ github.ref_name }}
- name: Upload release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: backup-flow-${{ github.ref_name }}.tar.gz
tag: ${{ github.ref }}
overwrite: true
make_latest: true
body: "${{ needs.generate-changelog.outputs.release_body }}"