mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-08-18 20:00:16 +00:00
Bumps the github-actions group with 3 updates: [step-security/harden-runner](https://github.com/step-security/harden-runner), [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) and [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance). Updates `step-security/harden-runner` from 2.20.0 to 2.20.1 - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](https://github.com/step-security/harden-runner/compare/bf7454d06d71f1098171f2acdf0cd4708d7b5920...b09bb98e06d4d774595224525879c09bc6e98c40) Updates `github/codeql-action/upload-sarif` from 4.37.4 to 4.37.6 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/f205ea1c3313d32999d8d6a48b4f6530d4437b38...5595ccaf912efad79be6eef63a5619ff05969be3) Updates `actions/attest-build-provenance` from 4.1.1 to 4.2.2 - [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/0f67c3f4856b2e3261c31976d6725780e5e4c373...4d101475d8b20a2381f78447822ac1eab6504dd8) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-version: 2.20.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.37.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/attest-build-provenance dependency-version: 4.2.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
90 lines
3.3 KiB
YAML
90 lines
3.3 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 1
|
|
path: go/src/open-cluster-management.io/ocm
|
|
- name: set up Python 3.x
|
|
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
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@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5
|
|
- 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@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3
|
|
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@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4
|
|
with:
|
|
subject-path: '/home/runner/work/ocm/ocm/go/src/open-cluster-management.io/ocm/release/*.tgz'
|