Skip to content

Commit c000620

Browse files
committed
chg: dev: update workflows, add nested release workflow
Signed-off-by: Stephen L Arnold <sarnold@vctlabs.com>
1 parent 67f3e66 commit c000620

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/debs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Debian packages
22

33
on:
44
workflow_dispatch:
5+
workflow_call:
56
pull_request:
67
push:
78
branches:
@@ -11,6 +12,8 @@ jobs:
1112
get_version:
1213
name: Get version info
1314
runs-on: ubuntu-22.04
15+
permissions:
16+
contents: read
1417
defaults:
1518
run:
1619
shell: bash
@@ -32,6 +35,8 @@ jobs:
3235
build_debs:
3336
name: ${{ matrix.name }}
3437
runs-on: ubuntu-22.04
38+
permissions:
39+
contents: read
3540
needs: [get_version]
3641

3742
strategy:

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
# release on tag push
7+
tags:
8+
- '*'
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build_debs:
15+
name: Build deb packages
16+
permissions:
17+
contents: read
18+
uses: ./.github/workflows/debs.yml
19+
20+
create_release:
21+
name: Create Release
22+
needs: [build_wheels, build_docs]
23+
runs-on: ubuntu-22.04
24+
25+
steps:
26+
- name: Get version
27+
id: get_version
28+
run: |
29+
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
30+
echo ${{ env.VERSION }}
31+
32+
- uses: actions/checkout@v5
33+
with:
34+
fetch-depth: 0
35+
36+
# download all artifacts to project dir
37+
- uses: actions/download-artifact@v5
38+
with:
39+
path: packages
40+
pattern: libtins*
41+
merge-multiple: true
42+
43+
- name: check artifacts
44+
run: |
45+
ls -l packages
46+
47+
- name: Generate changes file
48+
uses: sarnold/gitchangelog-action@915234f151ceffb7a8c4f76de77e4ae321087b8f # v1.1.1
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN}}
51+
52+
- name: Create release
53+
id: create_release
54+
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
55+
if: startsWith(github.ref, 'refs/tags/')
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
with:
59+
tag_name: ${{ env.VERSION }}
60+
name: Release ${{ env.VERSION }}
61+
body_path: CHANGES.md
62+
draft: false
63+
prerelease: false
64+
files: |
65+
packages/*.tar.gz
66+
packages/*.deb

0 commit comments

Comments
 (0)