-
-
Notifications
You must be signed in to change notification settings - Fork 129
58 lines (51 loc) · 1.87 KB
/
release.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
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Package helm-secrets
run: tar --transform 's,^,helm-secrets/,' --exclude=contrib --exclude=examples --exclude=tests --exclude=helm-secrets.tar.gz -zcvf helm-secrets.tar.gz *
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: ${{ contains(github.ref_name, 'rc') }}
files: helm-secrets.tar.gz
body: |-
# CHANGELOG
* https://github.com/jkroepke/helm-secrets/blob/${{ github.ref_name }}/CHANGELOG.md
docs:
name: Set latest version
runs-on: ubuntu-latest
if: "!contains(github.ref_name, 'rc')"
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- run: >-
sed -i 's/HELM_SECRETS_VERSION=".*"/HELM_SECRETS_VERSION="'${GITHUB_REF_NAME/v}'"/g' docs/ArgoCD\ Integration.md
- run: >-
sed -i -e '/- name: HELM_SECRETS_VERSION/{n;d;}' docs/ArgoCD\ Integration.md
- run: >-
sed -i -e '/- name: HELM_SECRETS_VERSION/a\'$'\n'' value: "'${GITHUB_REF_NAME/v}'"' docs/ArgoCD\ Integration.md
- run: >-
sed -i "s/--version .*/--version ${GITHUB_REF_NAME}/g" docs/Installation.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "[docs] Set version to ${{ github.ref_name }}"
title: "[docs] Set version to ${{ github.ref_name }}"
delete-branch: true
base: main
branch: docs/${{ github.ref_name }}