Files
open-cluster-management/.github/workflows/release.yml
dependabot[bot] 89447686bb
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 28s
Post / coverage (push) Failing after 32s
Post / images (amd64, addon-manager) (push) Failing after 32s
Post / images (amd64, placement) (push) Failing after 32s
Post / images (amd64, registration) (push) Failing after 31s
Post / images (amd64, registration-operator) (push) Failing after 32s
Post / images (amd64, work) (push) Failing after 32s
Post / images (arm64, addon-manager) (push) Failing after 28s
Post / images (arm64, placement) (push) Failing after 30s
Post / images (arm64, registration) (push) Failing after 31s
Post / images (arm64, registration-operator) (push) Failing after 35s
Post / images (arm64, work) (push) Failing after 32s
Post / image manifest (addon-manager) (push) Has been skipped
Post / image manifest (placement) (push) Has been skipped
Post / image manifest (registration) (push) Has been skipped
Post / image manifest (registration-operator) (push) Has been skipped
Post / image manifest (work) (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Failing after 29s
🌱 Bump the github-actions group with 7 updates (#1172)
Bumps the github-actions group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/github-script](https://github.com/actions/github-script) | `7` | `8` |
| [actions/dependency-review-action](https://github.com/actions/dependency-review-action) | `4.7.2` | `4.7.3` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.29.11` | `3.30.1` |
| [actions/attest-sbom](https://github.com/actions/attest-sbom) | `2` | `3` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5` | `6` |
| [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) | `2` | `3` |
| [actions/stale](https://github.com/actions/stale) | `9` | `10` |


Updates `actions/github-script` from 7 to 8
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

Updates `actions/dependency-review-action` from 4.7.2 to 4.7.3
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](bc41886e18...595b5aeba7)

Updates `github/codeql-action` from 3.29.11 to 3.30.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3c3833e0f8...f1f6e5f6af)

Updates `actions/attest-sbom` from 2 to 3
- [Release notes](https://github.com/actions/attest-sbom/releases)
- [Changelog](https://github.com/actions/attest-sbom/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-sbom/compare/v2...v3)

Updates `actions/setup-python` from 5 to 6
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

Updates `actions/attest-build-provenance` from 2 to 3
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-build-provenance/compare/v2...v3)

Updates `actions/stale` from 9 to 10
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/dependency-review-action
  dependency-version: 4.7.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 3.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/attest-sbom
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/attest-build-provenance
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 15:09:21 +00:00

90 lines
3.0 KiB
YAML

name: GoRelease
permissions:
contents: read
on:
push:
tags:
- 'v*.*.*'
env:
GITHUB_REF: ${{ github.ref }}
defaults:
run:
working-directory: go/src/open-cluster-management.io/ocm
jobs:
env:
name: prepare release env
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v5
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/ocm
- name: get release version
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: get major release version
run: |
echo "MAJOR_RELEASE_VERSION=${RELEASE_VERSION%.*}" >> $GITHUB_ENV
echo "TRIMMED_RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_ENV
outputs:
MAJOR_RELEASE_VERSION: ${{ env.MAJOR_RELEASE_VERSION }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
TRIMMED_RELEASE_VERSION: ${{ env.TRIMMED_RELEASE_VERSION }}
release:
name: release
runs-on: ubuntu-latest
needs: [ env ]
permissions:
contents: write
id-token: write
attestations: write
steps:
- name: checkout code
uses: actions/checkout@v5
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/ocm
- name: set up Python 3.x
uses: actions/setup-python@v6
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub
- name: generate changelog
run: |
python hack/changelog.py ${{ secrets.GITHUB_TOKEN }} ${{ needs.env.outputs.RELEASE_VERSION }} > /home/runner/work/changelog.txt
cat /home/runner/work/changelog.txt
- name: setup helm
uses: azure/setup-helm@v4
- name: chart package
if: github.event_name != 'pull_request'
run: |
mkdir -p release
pushd release
helm package ../deploy/cluster-manager/chart/cluster-manager --app-version ${{ needs.env.outputs.RELEASE_VERSION }} --version ${{ needs.env.outputs.TRIMMED_RELEASE_VERSION }}
helm package ../deploy/klusterlet/chart/klusterlet --app-version ${{ needs.env.outputs.RELEASE_VERSION }} --version ${{ needs.env.outputs.TRIMMED_RELEASE_VERSION }}
popd
- name: publish release
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: /home/runner/work/changelog.txt
draft: true
generate_release_notes: true
files: |
/home/runner/work/ocm/ocm/go/src/open-cluster-management.io/ocm/release/*.tgz
- name: generate helm charts attestation
uses: actions/attest-build-provenance@v3
with:
subject-path: '/home/runner/work/ocm/ocm/go/src/open-cluster-management.io/ocm/release/*.tgz'