forked from defenseunicorns/pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.93 KB
/
release-helpers.yaml
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
name: Release Helpers
on:
push:
branches:
- main
paths:
- 'helpers/**'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# - name: Release
# uses: ./.github/actions/release
# with:
# module: "helpers"
- name: bump module version
id: module-tag
run: |
git fetch --tags
cd internal/release
echo "new-version=$(go run main.go helpers)" >> $GITHUB_OUTPUT
shell: bash
- name: install git cliffs
env:
# renovate: datasource=github-tags depName=orhun/git-cliff versioning=semver
VERSION: 2.1.2
run: |
curl --location --output /tmp/git-cliffs.tar.gz https://github.com/orhun/git-cliff/releases/download/v${VERSION}/git-cliff-${VERSION}-x86_64-unknown-linux-gnu.tar.gz
tar -xvzf /tmp/git-cliffs.tar.gz -C /tmp
mv /tmp/git-cliff-${VERSION}/git-cliff /usr/local/bin/
shell: bash
- name: specify helpers
run: git cliff -u --tag ${{ steps.module-tag.outputs.new-version }} --include-path "helpers/*"
- name: generate release notes without specifying helpers
run: |
git cliff -u --tag ${{ steps.module-tag.outputs.new-version }} | tee notes.md
shell: bash
- name: Release
env:
GH_TOKEN: ${{ github.token }}
run: |
cat notes.md
gh release create ${{ steps.module-tag.outputs.new-version }} --notes-file notes.md
git fetch --all
shell: bash
- name: specify helpers
run: |
git cliff -vv --latest --include-path "helpers/*" --github-token ${{ github.token }}
- name: generate release notes without specifying helpers
run: |
git cliff --latest | tee notes.md
shell: bash