Skip to content

Commit

Permalink
Improve workflow dispatch to prepare release
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Emmanuel Jacquier <[email protected]>
  • Loading branch information
pierre-emmanuelJ committed Jan 16, 2025
1 parent 3b7bc9b commit 5f81a89
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 1,175 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/prepare-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,35 @@ on:
jobs:
prepare_release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

uses: actions/checkout@v4
- name: Set variables
id: vars
run: |
TAG="${{ github.event.inputs.tag }}"
VERSION="${TAG#v}"
echo "TAG=${TAG}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Copy deployment files
run: |
mkdir -p deployment/${VERSION}
cp -r deployment/latest/* "deployment/${VERSION}"
- name: Replace 'latest' with version in deployment files
run: |
sed -i 's/csi-driver:latest/csi-driver:${VERSION}/g' deployment/${VERSION}/*
sed -i "s/csi-driver:latest/csi-driver:${VERSION}/g" deployment/${VERSION}/*
- name: Update CHANGELOG.md
run: |
sed -i "s/[Uu]nreleased/${{ github.event.inputs.tag }}/" CHANGELOG.md
- name: Commit changes
run: |
git config --global user.name "Exoscale"
git config --global user.email "[email protected]"
git add deployment/${VERSION} CHANGELOG.md
git commit -m "prepare release ${{ github.event.inputs.tag }}"
- name: Tag the commit
run: |
git tag "${{ github.event.inputs.tag }}"
- name: Push commit and tags
run: |
git push origin HEAD
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## v0.31.2
## Unreleased

### Improvements

Expand Down
144 changes: 0 additions & 144 deletions deployment/0.31.2/controller-rbac.yaml

This file was deleted.

191 changes: 0 additions & 191 deletions deployment/0.31.2/controller.yaml

This file was deleted.

Loading

0 comments on commit 5f81a89

Please sign in to comment.