File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 shell : bash
4141 run : |
4242 export TAG_NAME="${REF#*/tags/}"
43+ export ARTIFACTS_DIR="$(pwd)/artifacts"
44+ mkdir -p "${ARTIFACTS_DIR}"
4345 ./ci/save_version_info.sh
4446 ./ci/operator_build_release.sh
4547 - name : Update Manifest
4648 env :
4749 ARTIFACT_MANIFEST_BUCKET : " pixie-dev-public"
4850 run : ./ci/update_artifact_manifest.sh
51+ - uses : actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
52+ with :
53+ name : operator-artifacts
54+ path : artifacts/
55+ create-github-release :
56+ if : ${{ !contains(github.event.ref, '-') }}
57+ name : Create Release on Github
58+ runs-on : ubuntu-latest
59+ needs : build-release
60+ permissions :
61+ contents : write
62+ steps :
63+ - uses : actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
64+ with :
65+ fetch-depth : 0
66+ - uses : actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
67+ - name : Create Release
68+ env :
69+ REF : ${{ github.event.ref }}
70+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71+ OWNER : pixie-io
72+ REPO : pixie
73+ shell : bash
74+ # yamllint disable rule:indentation
75+ run : |
76+ export TAG_NAME="${REF#*/tags/}"
77+ # actions/checkout doesn't get the tag annotation properly.
78+ git fetch origin tag "${TAG_NAME}" -f
79+ export changelog="$(git tag -l --format='%(contents)' "${TAG_NAME}")"
80+ gh release create "${TAG_NAME}" --title "Operator ${TAG_NAME#release/operator/}" \
81+ --notes $'Pixie Operator Release:\n'"${changelog}"
82+ gh release upload "${TAG_NAME}" operator-artifacts/*
83+ # yamllint enable rule:indentation
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ parse_args() {
3333
3434parse_args " $@ "
3535tmp_dir=" $( mktemp -d) "
36+ artifacts_dir=" ${ARTIFACTS_DIR:? } "
3637
3738helm_gcs_bucket=" pixie-operator-charts"
3839if [[ $VERSION == * " -" * ]]; then
@@ -81,5 +82,9 @@ helm package "${helm_path}2" -d "${tmp_dir}/${helm_gcs_bucket}"
8182# Update the index file.
8283helm repo index " ${tmp_dir} /${helm_gcs_bucket} " --url " https://${helm_gcs_bucket} .storage.googleapis.com"
8384
85+ cp " ${tmp_dir} /${helm_gcs_bucket} /pixie-operator-chart-${VERSION} .tgz" " ${artifacts_dir} /pixie-operator-chart-${VERSION} .tgz"
86+ sha256sum " ${tmp_dir} /${helm_gcs_bucket} /pixie-operator-chart-${VERSION} .tgz" | awk ' {print $1}' > sha
87+ cp sha " ${artifacts_dir} /pixie-operator-chart-${VERSION} .tgz.sha256"
88+
8489# Upload the new index and tar to gcs by syncing. This will help keep the timestamps for pre-existing tars the same.
8590gsutil rsync " ${tmp_dir} /${helm_gcs_bucket} " " gs://${helm_gcs_bucket} "
You can’t perform that action at this time.
0 commit comments