Abacn commented on code in PR #31369:
URL: https://github.com/apache/beam/pull/31369#discussion_r1616304712
##########
.github/workflows/build_release_candidate.yml:
##########
@@ -396,8 +402,134 @@ jobs:
- name: Create beam-site PR
working-directory: beam-site
env:
- GH_TOKEN: ${{ github.event.inputs.BEAM_SITE_TOKEN }}
+ GH_TOKEN: ${{ github.event.inputs.REPO_TOKEN }}
PR_TITLE: "Publish docs for ${{ github.event.inputs.RELEASE }}
release"
PR_BODY: "Content generated from
https://github.com/apache/beam/tree/${{ env.RC_TAG }}."
run: |
gh pr create -t "$PR_TITLE" -b "$PR_BODY" --base release-docs
+
+ build_and_stage_prism:
+ if: ${{ fromJson(github.event.inputs.STAGE).prism == 'yes'}}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ ref: "v${{ github.event.inputs.RELEASE }}-RC${{
github.event.inputs.RC }}"
+ repository: apache/beam
+ - name: Mask Apache Password
+ run: |
+ # Workaround for Actions bug -
https://github.com/actions/runner/issues/643
+ APACHE_PASS=$(jq -r '.inputs.APACHE_PASSWORD' $GITHUB_EVENT_PATH)
+ echo "::add-mask::$APACHE_PASS"
+ - name: Mask apache id/password
+ run: |
+ if [ "${{ github.event.inputs.APACHE_ID }}" == "" ]
+ then
+ echo "Must provide an apache id to stage artifacts to
https://dist.apache.org/repos/dist/dev/beam/"
+ fi
+ if [ "${{ github.event.inputs.APACHE_PASSWORD }}" == "" ]
+ then
+ echo "Must provide an apache password to stage artifacts to
https://dist.apache.org/repos/dist/dev/beam/"
+ fi
+ - uses: actions/setup-go@v5
+ with:
+ go-version: '1.22'
+ cache-dependency-path: |
+ sdks/go.sum
+ - name: Import GPG key
+ id: import_gpg
+ uses:
crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549
+ with:
+ gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
+ - name: Build prism artifacts
+ env:
+ RC_TAG: "v${{ github.event.inputs.RELEASE }}-RC${{
github.event.inputs.RC }}"
+ GIT_REPO_BASE_URL: https://github.com/apache/beam
+ RELEASE_DIR: "beam/${{ github.event.inputs.RELEASE }}"
+ RELEASE: "${{ github.event.inputs.RELEASE }}"
+ GH_TOKEN: ${{ github.event.inputs.REPO_TOKEN }}
+ SVN_ARTIFACTS_DIR: "beam/${{ github.event.inputs.RELEASE }}/prism"
+ run: |
+ # TODO stop the action if a non-prerelease release exists
+ # TODO create the draft release automatically if none exist.
+ # TODO update the draft release's RC tag to current.
+
+ export GH_RELEASE_ID=`gh api \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ /repos/apache/beam/releases | jq '.[] | select(.tag_name |
contains(env.RC_TAG)) .id'`
+
+ echo "with gh release id $GH_RELEASE_ID for tag $RC_TAG"
+
+ # Store a reference so we can get back to the start.
+ ROOT_DIR=`pwd`
+ echo "ROOT_DIR=$ROOT_DIR"
+ echo "............Checking out Apache Dev Repo.........."
+
+ svn co https://dist.apache.org/repos/dist/dev/beam
+ mkdir -p "${SVN_ARTIFACTS_DIR}"
+
+ OUTPUT_DIR=$ROOT_DIR/$SVN_ARTIFACTS_DIR
+ mkdir -p $OUTPUT_DIR
+ echo "OUTPUT_DIR=$OUTPUT_DIR"
+
+ # Remove existing prism contents from the svn repo.
+ cd $OUTPUT_DIR
+ rm -rf *
+ cd $ROOT_DIR
+
+ # Navigate to the prism command directory.
+ cd sdks/go/cmd/prism
+
+ # Store a reference to where we're building from.
+ BUILD_DIR=`pwd`
+
+ echo "............Build and stage prism artifacts in the Github
Release $GH_RELEASE_ID for tag $RC_TAG.........."
+
+
+ # Loop through and build desired set from allowed types.
+ for OS in linux windows darwin; do
+ for ARCH in amd64 arm64; do
Review Comment:
Do we need a full matrix of 2x3=6 builds. Fine to leave as is but just
wondering if cross-compiled archs takes take long time to build
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]