Skip to content

Commit

Permalink
chore: publish release artifacts to the public CDN (#9720)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
  • Loading branch information
nathanklick committed Nov 7, 2023
1 parent 0e526ec commit 7eaa21b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/node-flow-deploy-adhoc-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
secrets:
access-token: ${{ secrets.GITHUB_TOKEN }}
bucket-name: ${{ secrets.RELEASE_ARTIFACT_BUCKET_NAME }}
cdn-bucket-name: ${{ secrets.CDN_ARTIFACT_BUCKET_NAME }}
svcs-ossrh-username: ${{ secrets.SVCS_OSSRH_USERNAME }}
svcs-ossrh-password: ${{ secrets.SVCS_OSSRH_PASSWORD }}
svcs-gpg-key-contents: ${{ secrets.SVCS_GPG_KEY_CONTENTS }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/node-flow-deploy-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
secrets:
access-token: ${{ secrets.GITHUB_TOKEN }}
bucket-name: ${{ secrets.RELEASE_ARTIFACT_BUCKET_NAME }}
cdn-bucket-name: ${{ secrets.CDN_ARTIFACT_BUCKET_NAME }}
svcs-ossrh-username: ${{ secrets.SVCS_OSSRH_USERNAME }}
svcs-ossrh-password: ${{ secrets.SVCS_OSSRH_PASSWORD }}
svcs-gpg-key-contents: ${{ secrets.SVCS_GPG_KEY_CONTENTS }}
Expand All @@ -96,6 +97,7 @@ jobs:
secrets:
access-token: ${{ secrets.GITHUB_TOKEN }}
bucket-name: ${{ secrets.RELEASE_ARTIFACT_BUCKET_NAME }}
cdn-bucket-name: ${{ secrets.CDN_ARTIFACT_BUCKET_NAME }}
svcs-ossrh-username: ${{ secrets.SVCS_OSSRH_USERNAME }}
svcs-ossrh-password: ${{ secrets.SVCS_OSSRH_PASSWORD }}
svcs-gpg-key-contents: ${{ secrets.SVCS_GPG_KEY_CONTENTS }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/node-zxc-build-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ on:
required: true
bucket-name:
required: true
cdn-bucket-name:
required: true
svcs-ossrh-username:
required: true
svcs-ossrh-password:
Expand Down Expand Up @@ -115,6 +117,8 @@ jobs:
commit-id: ${{ steps.parameters.outputs.commit-id }}
commit-id-short: ${{ steps.parameters.outputs.commit-id-short }}
version: ${{ steps.effective-version.outputs.number }}
version-prefix: ${{ steps.effective-version.outputs.prefix }}
prerelease: ${{ steps.effective-version.outputs.prerelease }}
steps:
- name: Install Semantic Version Tools
run: |
Expand Down Expand Up @@ -188,7 +192,16 @@ jobs:
id: effective-version
run: |
EFF_VERSION="$(./gradlew showVersion --quiet | tr -d '[:space:]')"
PRERELEASE_SUFFIX="$(semver get prerel "${EFF_VERSION}")"
PRERELEASE="false"
[[ -n "${PRERELEASE_SUFFIX}" ]] && PRERELEASE="true"
MAJOR_VERSION="$(semver get major "${EFF_VERSION}")"
MINOR_VERSION="$(semver get minor "${EFF_VERSION}")"
echo "number=${EFF_VERSION}" >>"${GITHUB_OUTPUT}"
echo "prefix=${MAJOR_VERSION}.${MINOR_VERSION" >>"${GITHUB_OUTPUT}"
echo "prerelease=${PRERELEASE}" >>"${GITHUB_OUTPUT}"
- name: Cache Build Version
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
Expand Down Expand Up @@ -347,6 +360,14 @@ jobs:
destination: ${{ secrets.bucket-name }}
parent: false

- name: Upload Artifacts (CDN Bucket)
uses: google-github-actions/upload-cloud-storage@e95a15f226403ed658d3e65f40205649f342ba2c # v1.0.3
if: ${{ inputs.dry-run-enabled != true && needs.validate.outputs.prerelease != 'true' && !cancelled() && !failure() }}
with:
path: ${{ steps.artifact-release.outputs.folder }}
destination: ${{ secrets.cdn-bucket-name }}/node/software/v${{ needs.validate.outputs.version-prefix }}/
parent: false

- name: Notify Jenkins of Release (Integration)
id: jenkins-integration
uses: fjogeleit/http-request-action@eab8015483ccea148feff7b1c65f320805ddc2bf # v1.14.1
Expand Down

0 comments on commit 7eaa21b

Please sign in to comment.