Skip to content

Create Release

Create Release #46

Workflow file for this run

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@v3
- 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@v1
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@v3
- 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@v5
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 }}