chore(chart): bump Stable to 2026.1.7.0 #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [master] | |
| paths: ['chart/Chart.yaml'] | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.get-version.outputs.version }} | |
| release_type: ${{ steps.get-version.outputs.release_type }} | |
| steps: | |
| - name: Check out ${{ github.repository }} | |
| uses: actions/checkout@v4 | |
| - name: Check out Devolutions/actions | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Devolutions/actions | |
| ref: v1 | |
| token: ${{ secrets.DEVOLUTIONSBOT_TOKEN }} | |
| path: ./.github/workflows | |
| - name: Set version | |
| id: get-version | |
| run: | | |
| echo "version=$(grep '^version:' chart/Chart.yaml | awk '{print $2}')" >> "$GITHUB_OUTPUT" | |
| release_type=$(echo "$COMMIT_MSG" | sed -n 's/.*bump \(Beta\|Stable\|LTS\) to.*/\1/p') | |
| echo "release_type=${release_type}" >> "$GITHUB_OUTPUT" | |
| env: | |
| COMMIT_MSG: ${{ github.event.head_commit.message }} | |
| - name: Check tag does not already exist | |
| run: | | |
| if gh release view "v${{ steps.get-version.outputs.version }}" &>/dev/null; then | |
| echo "::error::Release v${{ steps.get-version.outputs.version }} already exists. Bump the version in chart/Chart.yaml first." | |
| exit 1 | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create release | |
| uses: ./.github/workflows/create-release | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: v${{ steps.get-version.outputs.version }} | |
| - name: Add release type to notes | |
| if: steps.get-version.outputs.release_type != '' | |
| run: | | |
| body=$(gh release view "$TAG" --json body -q '.body') | |
| notes="**Release type: $RELEASE_TYPE**${body:+$'\n\n'$body}" | |
| prerelease_flag="" | |
| if [ "$RELEASE_TYPE" = "Beta" ]; then | |
| prerelease_flag="--prerelease" | |
| fi | |
| gh release edit "$TAG" --notes "$notes" $prerelease_flag | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: v${{ steps.get-version.outputs.version }} | |
| RELEASE_TYPE: ${{ steps.get-version.outputs.release_type }} | |
| publish-helm-chart: | |
| runs-on: ubuntu-latest | |
| needs: create-release | |
| environment: helm-publish | |
| steps: | |
| - name: Check out ${{ github.repository }} | |
| uses: actions/checkout@v4 | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| - name: Add pre-release suffix for Beta | |
| if: ${{ needs.create-release.outputs.release_type == 'Beta' }} | |
| run: 'sed -i "s/^version: .*/version: ${{ needs.create-release.outputs.version }}-beta/" chart/Chart.yaml' | |
| - name: Package chart | |
| run: helm package chart/ | |
| - name: Check out helm-charts repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Devolutions/helm-charts | |
| token: ${{ secrets.DEVOLUTIONSBOT_WRITE_TOKEN }} | |
| path: helm-charts | |
| - name: Copy chart package | |
| run: | | |
| mkdir -p helm-charts/devolutions-server | |
| cp devolutions-server-*.tgz helm-charts/devolutions-server/ | |
| - name: Update index | |
| working-directory: helm-charts | |
| run: | | |
| if [ -f index.yaml ]; then | |
| helm repo index . --url https://devolutions.github.io/helm-charts --merge index.yaml | |
| else | |
| helm repo index . --url https://devolutions.github.io/helm-charts | |
| fi | |
| - name: Commit and push | |
| working-directory: helm-charts | |
| run: | | |
| git config user.name "devolutionsbot" | |
| git config user.email "bot@devolutions.net" | |
| git add devolutions-server/devolutions-server-*.tgz index.yaml | |
| git commit -m "feat(devolutions-server): add version ${{ needs.create-release.outputs.version }}" | |
| git push |